diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 79 |
1 files changed, 8 insertions, 71 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e35481f..9a879f7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1214,7 +1214,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1214 | ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; | 1214 | ControllingClient.OnUpdateThrottles += RaiseUpdateThrottles; |
1215 | ControllingClient.OnRegionHandShakeReply += RegionHandShakeReply; | 1215 | ControllingClient.OnRegionHandShakeReply += RegionHandShakeReply; |
1216 | 1216 | ||
1217 | // ControllingClient.OnAgentFOV += HandleAgentFOV; | 1217 | // ControllingClient.OnAgentFOV += HandleAgentFOV; |
1218 | 1218 | ||
1219 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); | 1219 | // ControllingClient.OnChildAgentStatus += new StatusChange(this.ChildStatusChange); |
1220 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); | 1220 | // ControllingClient.OnStopMovement += new GenericCall2(this.StopMovement); |
@@ -4022,12 +4022,18 @@ namespace OpenSim.Region.Framework.Scenes | |||
4022 | ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations); | 4022 | ControllingClient.SendCoarseLocationUpdate(avatarUUIDs, coarseLocations); |
4023 | } | 4023 | } |
4024 | 4024 | ||
4025 | |||
4026 | public void RegionHandShakeReply (IClientAPI client, uint flags) | 4025 | public void RegionHandShakeReply (IClientAPI client, uint flags) |
4027 | { | 4026 | { |
4028 | if(IsNPC) | 4027 | if(IsNPC) |
4029 | return; | 4028 | return; |
4030 | 4029 | ||
4030 | lock (m_completeMovementLock) | ||
4031 | { | ||
4032 | if (SentInitialData) | ||
4033 | return; | ||
4034 | SentInitialData = true; | ||
4035 | } | ||
4036 | |||
4031 | bool selfappearance = (flags & 4) != 0; | 4037 | bool selfappearance = (flags & 4) != 0; |
4032 | bool cacheCulling = (flags & 1) != 0; | 4038 | bool cacheCulling = (flags & 1) != 0; |
4033 | bool cacheEmpty; | 4039 | bool cacheEmpty; |
@@ -4036,16 +4042,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4036 | else | 4042 | else |
4037 | cacheEmpty = true; | 4043 | cacheEmpty = true; |
4038 | 4044 | ||
4039 | // if (m_teleportFlags > 0) // only doing for child for now | ||
4040 | // return; | ||
4041 | |||
4042 | lock (m_completeMovementLock) | ||
4043 | { | ||
4044 | if (SentInitialData) | ||
4045 | return; | ||
4046 | SentInitialData = true; | ||
4047 | } | ||
4048 | |||
4049 | Util.FireAndForget(delegate | 4045 | Util.FireAndForget(delegate |
4050 | { | 4046 | { |
4051 | if (m_teleportFlags <= 0) | 4047 | if (m_teleportFlags <= 0) |
@@ -4108,65 +4104,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4108 | 4104 | ||
4109 | } | 4105 | } |
4110 | 4106 | ||
4111 | public void SendInitialDataToMe() | ||
4112 | { | ||
4113 | // Send all scene object to the new client | ||
4114 | lock (m_completeMovementLock) | ||
4115 | { | ||
4116 | if (SentInitialData) | ||
4117 | return; | ||
4118 | SentInitialData = true; | ||
4119 | } | ||
4120 | |||
4121 | Util.FireAndForget(delegate | ||
4122 | { | ||
4123 | // we created a new ScenePresence (a new child agent) in a fresh region. | ||
4124 | // Request info about all the (root) agents in this region | ||
4125 | // Note: This won't send data *to* other clients in that region (children don't send) | ||
4126 | if (m_teleportFlags <= 0) | ||
4127 | { | ||
4128 | Scene.SendLayerData(ControllingClient); | ||
4129 | |||
4130 | ILandChannel landch = m_scene.LandChannel; | ||
4131 | if (landch != null) | ||
4132 | { | ||
4133 | landch.sendClientInitialLandInfo(ControllingClient, true); | ||
4134 | } | ||
4135 | } | ||
4136 | |||
4137 | // recheck to reduce timing issues | ||
4138 | ControllingClient.CheckViewerCaps(); | ||
4139 | |||
4140 | SendOtherAgentsAvatarFullToMe(); | ||
4141 | |||
4142 | if(m_scene.ObjectsCullingByDistance) | ||
4143 | { | ||
4144 | m_reprioritizationBusy = true; | ||
4145 | m_reprioritizationLastPosition = AbsolutePosition; | ||
4146 | m_reprioritizationLastDrawDistance = DrawDistance; | ||
4147 | |||
4148 | ControllingClient.ReprioritizeUpdates(); | ||
4149 | m_reprioritizationLastTime = Util.EnvironmentTickCount(); | ||
4150 | m_reprioritizationBusy = false; | ||
4151 | return; | ||
4152 | } | ||
4153 | |||
4154 | EntityBase[] entities = Scene.Entities.GetEntities(); | ||
4155 | foreach (EntityBase e in entities) | ||
4156 | { | ||
4157 | if (e != null && e is SceneObjectGroup && !((SceneObjectGroup)e).IsAttachment) | ||
4158 | ((SceneObjectGroup)e).SendFullAnimUpdateToClient(ControllingClient); | ||
4159 | } | ||
4160 | |||
4161 | m_reprioritizationLastPosition = AbsolutePosition; | ||
4162 | m_reprioritizationLastDrawDistance = DrawDistance; | ||
4163 | m_reprioritizationLastTime = Util.EnvironmentTickCount() + 15000; // delay it | ||
4164 | |||
4165 | m_reprioritizationBusy = false; | ||
4166 | |||
4167 | }); | ||
4168 | } | ||
4169 | |||
4170 | /// <summary> | 4107 | /// <summary> |
4171 | /// Send avatar full data appearance and animations for all other root agents to this agent, this agent | 4108 | /// Send avatar full data appearance and animations for all other root agents to this agent, this agent |
4172 | /// can be either a child or root | 4109 | /// can be either a child or root |