diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index f73d54e..2cfdd94 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1104,7 +1104,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1104 | 1104 | ||
1105 | AdjustKnownSeeds(); | 1105 | AdjustKnownSeeds(); |
1106 | 1106 | ||
1107 | RegisterToEvents(); | 1107 | RegisterToClientEvents(); |
1108 | SetDirectionVectors(); | 1108 | SetDirectionVectors(); |
1109 | 1109 | ||
1110 | Appearance = appearance; | 1110 | Appearance = appearance; |
@@ -1171,7 +1171,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1171 | } | 1171 | } |
1172 | } | 1172 | } |
1173 | 1173 | ||
1174 | public void RegisterToEvents() | 1174 | public void RegisterToClientEvents() |
1175 | { | 1175 | { |
1176 | ControllingClient.OnCompleteMovementToRegion += CompleteMovement; | 1176 | ControllingClient.OnCompleteMovementToRegion += CompleteMovement; |
1177 | ControllingClient.OnAgentUpdate += HandleAgentUpdate; | 1177 | ControllingClient.OnAgentUpdate += HandleAgentUpdate; |
@@ -1189,6 +1189,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 1189 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 1190 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
1191 | } | 1191 | } |
1192 | |||
1193 | public void RemoveClientEvents() | ||
1194 | { | ||
1195 | ControllingClient.OnCompleteMovementToRegion -= CompleteMovement; | ||
1196 | ControllingClient.OnAgentUpdate -= HandleAgentUpdate; | ||
1197 | ControllingClient.OnAgentCameraUpdate -= HandleAgentCamerasUpdate; | ||
1198 | ControllingClient.OnAgentRequestSit -= HandleAgentRequestSit; | ||
1199 | ControllingClient.OnAgentSit -= HandleAgentSit; | ||
1200 | ControllingClient.OnSetAlwaysRun -= HandleSetAlwaysRun; | ||
1201 | ControllingClient.OnStartAnim -= HandleStartAnim; | ||
1202 | ControllingClient.OnStopAnim -= HandleStopAnim; | ||
1203 | ControllingClient.OnChangeAnim -= avnHandleChangeAnim; | ||
1204 | ControllingClient.OnForceReleaseControls -= HandleForceReleaseControls; | ||
1205 | ControllingClient.OnAutoPilotGo -= MoveToTarget; | ||
1206 | ControllingClient.OnUpdateThrottles -= RaiseUpdateThrottles; | ||
1207 | } | ||
1192 | 1208 | ||
1193 | private void SetDirectionVectors() | 1209 | private void SetDirectionVectors() |
1194 | { | 1210 | { |
@@ -5016,12 +5032,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
5016 | RemoveFromPhysicalScene(); | 5032 | RemoveFromPhysicalScene(); |
5017 | 5033 | ||
5018 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; | 5034 | m_scene.EventManager.OnRegionHeartbeatEnd -= RegionHeartbeatEnd; |
5035 | RemoveClientEvents(); | ||
5019 | 5036 | ||
5020 | // if (Animator != null) | 5037 | // if (Animator != null) |
5021 | // Animator.Close(); | 5038 | // Animator.Close(); |
5022 | Animator = null; | 5039 | Animator = null; |
5023 | 5040 | ||
5041 | scriptedcontrols.Clear(); | ||
5042 | ControllingClient = null; | ||
5024 | LifecycleState = ScenePresenceState.Removed; | 5043 | LifecycleState = ScenePresenceState.Removed; |
5044 | IsDeleted = true; | ||
5025 | } | 5045 | } |
5026 | 5046 | ||
5027 | public void AddAttachment(SceneObjectGroup gobj) | 5047 | public void AddAttachment(SceneObjectGroup gobj) |