diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | 16 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 2 |
2 files changed, 13 insertions, 5 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs index 9bcaf32..4f24415 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandManagementModule.cs | |||
@@ -367,10 +367,18 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
367 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) | 367 | private void ForceAvatarToPosition(ScenePresence avatar, Vector3? position) |
368 | { | 368 | { |
369 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; | 369 | if (m_scene.Permissions.IsGod(avatar.UUID)) return; |
370 | if (position.HasValue) | 370 | |
371 | { | 371 | if (!position.HasValue) |
372 | forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; | 372 | return; |
373 | } | 373 | |
374 | bool isFlying = avatar.PhysicsActor.Flying; | ||
375 | avatar.RemoveFromPhysicalScene(); | ||
376 | |||
377 | avatar.AbsolutePosition = (Vector3)position; | ||
378 | |||
379 | avatar.AddToPhysicalScene(isFlying); | ||
380 | |||
381 | forcedPosition[avatar.ControllingClient.AgentId] = (Vector3)position; | ||
374 | } | 382 | } |
375 | 383 | ||
376 | public void SendYouAreRestrictedNotice(ScenePresence avatar) | 384 | public void SendYouAreRestrictedNotice(ScenePresence avatar) |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index a1ca9c5..1d7bf4c 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1128,7 +1128,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1128 | /// <summary> | 1128 | /// <summary> |
1129 | /// Removes physics plugin scene representation of this agent if it exists. | 1129 | /// Removes physics plugin scene representation of this agent if it exists. |
1130 | /// </summary> | 1130 | /// </summary> |
1131 | private void RemoveFromPhysicalScene() | 1131 | public void RemoveFromPhysicalScene() |
1132 | { | 1132 | { |
1133 | if (PhysicsActor != null) | 1133 | if (PhysicsActor != null) |
1134 | { | 1134 | { |