diff options
Diffstat (limited to 'OpenSim/Region/Environment')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 2 |
2 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 0e2b186..f54b52f 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs | |||
@@ -782,10 +782,15 @@ namespace OpenSim.Region.Environment.Scenes | |||
782 | if (UsePhysics) | 782 | if (UsePhysics) |
783 | { | 783 | { |
784 | AddFlag(LLObject.ObjectFlags.Physics); | 784 | AddFlag(LLObject.ObjectFlags.Physics); |
785 | if (PhysActor != null) | ||
786 | PhysActor.OnRequestTerseUpdate += PhysicsRequestingTerseUpdate; | ||
787 | |||
785 | } | 788 | } |
786 | else | 789 | else |
787 | { | 790 | { |
788 | RemFlag(LLObject.ObjectFlags.Physics); | 791 | RemFlag(LLObject.ObjectFlags.Physics); |
792 | if (PhysActor != null) | ||
793 | PhysActor.OnRequestTerseUpdate -= PhysicsRequestingTerseUpdate; | ||
789 | } | 794 | } |
790 | 795 | ||
791 | if (IsPhantom) | 796 | if (IsPhantom) |
@@ -1067,6 +1072,13 @@ namespace OpenSim.Region.Environment.Scenes | |||
1067 | public virtual void UpdateMovement() | 1072 | public virtual void UpdateMovement() |
1068 | { | 1073 | { |
1069 | } | 1074 | } |
1075 | #region Events | ||
1076 | public void PhysicsRequestingTerseUpdate() | ||
1077 | { | ||
1078 | SendTerseUpdateToAllClients(); | ||
1079 | } | ||
1080 | #endregion | ||
1081 | |||
1070 | 1082 | ||
1071 | public virtual void OnGrab(LLVector3 offsetPos, IClientAPI remoteClient) | 1083 | public virtual void OnGrab(LLVector3 offsetPos, IClientAPI remoteClient) |
1072 | { | 1084 | { |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 789bd68..608efc3 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -386,6 +386,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
386 | if (PhysicsActor != null) | 386 | if (PhysicsActor != null) |
387 | { | 387 | { |
388 | m_scene.PhysScene.RemoveAvatar(PhysicsActor); | 388 | m_scene.PhysScene.RemoveAvatar(PhysicsActor); |
389 | m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; | ||
389 | PhysicsActor = null; | 390 | PhysicsActor = null; |
390 | } | 391 | } |
391 | } | 392 | } |
@@ -1092,6 +1093,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
1092 | AbsolutePosition.Z); | 1093 | AbsolutePosition.Z); |
1093 | 1094 | ||
1094 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec); | 1095 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec); |
1096 | m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | ||
1095 | } | 1097 | } |
1096 | 1098 | ||
1097 | internal void Close() | 1099 | internal void Close() |