diff options
author | Melanie | 2012-02-23 01:40:30 +0000 |
---|---|---|
committer | Melanie | 2012-02-23 01:40:30 +0000 |
commit | 1dfc9902649bfb4f02340644a0589fe139a3322a (patch) | |
tree | 631a932e9317c50d96c7dbaa91ffc675421a9b48 /OpenSim/Region/Framework/Scenes/Scene.cs | |
parent | Restore the taskItem null check that I accidentally blatted in 5397a6d (diff) | |
download | opensim-SC-1dfc9902649bfb4f02340644a0589fe139a3322a.zip opensim-SC-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.gz opensim-SC-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.bz2 opensim-SC-1dfc9902649bfb4f02340644a0589fe139a3322a.tar.xz |
Add a position parameter to region crossing of objects. This avoids the
potential bad update that places an object at the opposite side of the
origin sim for a moment before actually crossing it. Especially important in
grids like OSG where lag between sims is high.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index e7f835c..7b79732 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -2317,7 +2317,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2317 | /// </summary> | 2317 | /// </summary> |
2318 | /// <param name="sog"></param> | 2318 | /// <param name="sog"></param> |
2319 | /// <returns></returns> | 2319 | /// <returns></returns> |
2320 | public bool IncomingCreateObject(ISceneObject sog) | 2320 | public bool IncomingCreateObject(Vector3 newPosition, ISceneObject sog) |
2321 | { | 2321 | { |
2322 | //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, | 2322 | //m_log.DebugFormat(" >>> IncomingCreateObject(sog) <<< {0} deleted? {1} isAttach? {2}", ((SceneObjectGroup)sog).AbsolutePosition, |
2323 | // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); | 2323 | // ((SceneObjectGroup)sog).IsDeleted, ((SceneObjectGroup)sog).RootPart.IsAttachment); |
@@ -2333,6 +2333,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
2333 | return false; | 2333 | return false; |
2334 | } | 2334 | } |
2335 | 2335 | ||
2336 | if (newPosition != Vector3.Zero) | ||
2337 | newObject.RootPart.GroupPosition = newPosition; | ||
2338 | |||
2336 | if (!AddSceneObject(newObject)) | 2339 | if (!AddSceneObject(newObject)) |
2337 | { | 2340 | { |
2338 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); | 2341 | m_log.DebugFormat("[SCENE]: Problem adding scene object {0} in {1} ", sog.UUID, RegionInfo.RegionName); |