diff options
Diffstat (limited to 'OpenSim/Region')
16 files changed, 95 insertions, 125 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs index b16ca53..4d8fb90 100644 --- a/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Chat/ChatModule.cs | |||
@@ -45,7 +45,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
45 | private const int DEBUG_CHANNEL = 2147483647; | 45 | private const int DEBUG_CHANNEL = 2147483647; |
46 | 46 | ||
47 | private bool m_enabled = true; | 47 | private bool m_enabled = true; |
48 | private int m_saydistance = 30; | 48 | private int m_saydistance = 20; |
49 | private int m_shoutdistance = 100; | 49 | private int m_shoutdistance = 100; |
50 | private int m_whisperdistance = 10; | 50 | private int m_whisperdistance = 10; |
51 | private List<Scene> m_scenes = new List<Scene>(); | 51 | private List<Scene> m_scenes = new List<Scene>(); |
@@ -242,7 +242,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
242 | 242 | ||
243 | foreach (Scene s in m_scenes) | 243 | foreach (Scene s in m_scenes) |
244 | { | 244 | { |
245 | s.ForEachScenePresence( | 245 | // This should use ForEachClient, but clients don't have a position. |
246 | // If camera is moved into client, then camera position can be used | ||
247 | s.ForEachRootScenePresence( | ||
246 | delegate(ScenePresence presence) | 248 | delegate(ScenePresence presence) |
247 | { | 249 | { |
248 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); | 250 | ILandObject Presencecheck = s.LandChannel.GetLandObject(presence.AbsolutePosition.X, presence.AbsolutePosition.Y); |
@@ -306,12 +308,10 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
306 | 308 | ||
307 | if (c.Scene != null) | 309 | if (c.Scene != null) |
308 | { | 310 | { |
309 | ((Scene)c.Scene).ForEachRootScenePresence | 311 | ((Scene)c.Scene).ForEachRootClient |
310 | ( | 312 | ( |
311 | delegate(ScenePresence presence) | 313 | delegate(IClientAPI client) |
312 | { | 314 | { |
313 | IClientAPI client = presence.ControllingClient; | ||
314 | |||
315 | // don't forward SayOwner chat from objects to | 315 | // don't forward SayOwner chat from objects to |
316 | // non-owner agents | 316 | // non-owner agents |
317 | if ((c.Type == ChatTypeEnum.Owner) && | 317 | if ((c.Type == ChatTypeEnum.Owner) && |
@@ -321,7 +321,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat | |||
321 | 321 | ||
322 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, | 322 | client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, |
323 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); | 323 | (byte)sourceType, (byte)ChatAudibleLevel.Fully); |
324 | receiverIDs.Add(presence.UUID); | 324 | receiverIDs.Add(client.AgentId); |
325 | } | 325 | } |
326 | ); | 326 | ); |
327 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( | 327 | (c.Scene as Scene).EventManager.TriggerOnChatToClients( |
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 00556c4..bb2cd1f 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -98,9 +98,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
98 | 98 | ||
99 | public void SendGeneralAlert(string message) | 99 | public void SendGeneralAlert(string message) |
100 | { | 100 | { |
101 | m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) | 101 | m_scene.ForEachRootClient(delegate(IClientAPI client) |
102 | { | 102 | { |
103 | presence.ControllingClient.SendAlertMessage(message); | 103 | client.SendAlertMessage(message); |
104 | }); | 104 | }); |
105 | } | 105 | } |
106 | 106 | ||
@@ -162,9 +162,9 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
162 | public void SendNotificationToUsersInRegion( | 162 | public void SendNotificationToUsersInRegion( |
163 | UUID fromAvatarID, string fromAvatarName, string message) | 163 | UUID fromAvatarID, string fromAvatarName, string message) |
164 | { | 164 | { |
165 | m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) | 165 | m_scene.ForEachRootClient(delegate(IClientAPI client) |
166 | { | 166 | { |
167 | presence.ControllingClient.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); | 167 | client.SendBlueBoxMessage(fromAvatarID, fromAvatarName, message); |
168 | }); | 168 | }); |
169 | } | 169 | } |
170 | 170 | ||
diff --git a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs index 93e65c3..41a80ce 100644 --- a/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs +++ b/OpenSim/Region/CoreModules/LightShare/LightShareModule.cs | |||
@@ -145,58 +145,39 @@ namespace OpenSim.Region.CoreModules.World.LightShare | |||
145 | param.Add(mBlock); | 145 | param.Add(mBlock); |
146 | return param; | 146 | return param; |
147 | } | 147 | } |
148 | public void SendProfileToClient(ScenePresence presence) | 148 | |
149 | public void SendProfileToClient(IClientAPI client) | ||
149 | { | 150 | { |
150 | IClientAPI client = presence.ControllingClient; | 151 | SendProfileToClient(client, m_scene.RegionInfo.WindlightSettings); |
151 | if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid) | ||
152 | { | ||
153 | if (presence.IsChildAgent == false) | ||
154 | { | ||
155 | List<byte[]> param = compileWindlightSettings(m_scene.RegionInfo.WindlightSettings); | ||
156 | client.SendGenericMessage("Windlight", param); | ||
157 | } | ||
158 | } | ||
159 | else | ||
160 | { | ||
161 | //We probably don't want to spam chat with this.. probably | ||
162 | //m_log.Debug("[WINDLIGHT]: Module disabled"); | ||
163 | } | ||
164 | } | 152 | } |
165 | public void SendProfileToClient(ScenePresence presence, RegionLightShareData wl) | 153 | |
154 | public void SendProfileToClient(IClientAPI client, RegionLightShareData wl) | ||
166 | { | 155 | { |
167 | IClientAPI client = presence.ControllingClient; | ||
168 | if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid) | 156 | if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid) |
169 | { | 157 | { |
170 | if (presence.IsChildAgent == false) | 158 | List<byte[]> param = compileWindlightSettings(wl); |
171 | { | 159 | client.SendGenericMessage("Windlight", param); |
172 | List<byte[]> param = compileWindlightSettings(wl); | ||
173 | client.SendGenericMessage("Windlight", param); | ||
174 | } | ||
175 | } | ||
176 | else | ||
177 | { | ||
178 | //We probably don't want to spam chat with this.. probably | ||
179 | //m_log.Debug("[WINDLIGHT]: Module disabled"); | ||
180 | } | 160 | } |
181 | } | 161 | } |
162 | |||
182 | private void EventManager_OnMakeRootAgent(ScenePresence presence) | 163 | private void EventManager_OnMakeRootAgent(ScenePresence presence) |
183 | { | 164 | { |
184 | if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid) | 165 | if (m_enableWindlight && m_scene.RegionInfo.WindlightSettings.valid) |
185 | m_log.Debug("[WINDLIGHT]: Sending windlight scene to new client"); | 166 | m_log.Debug("[WINDLIGHT]: Sending windlight scene to new client"); |
186 | SendProfileToClient(presence); | 167 | SendProfileToClient(presence.ControllingClient); |
187 | } | 168 | } |
169 | |||
188 | private void EventManager_OnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID pUUID) | 170 | private void EventManager_OnSendNewWindlightProfileTargeted(RegionLightShareData wl, UUID pUUID) |
189 | { | 171 | { |
190 | ScenePresence Sc; | 172 | IClientAPI client; |
191 | if (m_scene.TryGetScenePresence(pUUID,out Sc)) | 173 | m_scene.TryGetClient(pUUID, out client); |
192 | { | 174 | SendProfileToClient(client, wl); |
193 | SendProfileToClient(Sc,wl); | ||
194 | } | ||
195 | } | 175 | } |
176 | |||
196 | private void EventManager_OnSaveNewWindlightProfile() | 177 | private void EventManager_OnSaveNewWindlightProfile() |
197 | { | 178 | { |
198 | if (m_scene.RegionInfo.WindlightSettings.valid) | 179 | if (m_scene.RegionInfo.WindlightSettings.valid) |
199 | m_scene.ForEachScenePresence(SendProfileToClient); | 180 | m_scene.ForEachRootClient(SendProfileToClient); |
200 | } | 181 | } |
201 | 182 | ||
202 | public void PostInitialise() | 183 | public void PostInitialise() |
diff --git a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs index a14a84b..640a60b 100644 --- a/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs +++ b/OpenSim/Region/CoreModules/Scripting/WorldComm/WorldCommModule.cs | |||
@@ -95,7 +95,7 @@ namespace OpenSim.Region.CoreModules.Scripting.WorldComm | |||
95 | private Queue m_pendingQ; | 95 | private Queue m_pendingQ; |
96 | private Scene m_scene; | 96 | private Scene m_scene; |
97 | private int m_whisperdistance = 10; | 97 | private int m_whisperdistance = 10; |
98 | private int m_saydistance = 30; | 98 | private int m_saydistance = 20; |
99 | private int m_shoutdistance = 100; | 99 | private int m_shoutdistance = 100; |
100 | 100 | ||
101 | #region IRegionModule Members | 101 | #region IRegionModule Members |
diff --git a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs index 1471bc9..0067615 100644 --- a/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs +++ b/OpenSim/Region/CoreModules/World/Estate/EstateManagementModule.cs | |||
@@ -678,13 +678,14 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
678 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) | 678 | if (!Scene.Permissions.CanIssueEstateCommand(remover_client.AgentId, false)) |
679 | return; | 679 | return; |
680 | 680 | ||
681 | Scene.ForEachRootScenePresence(delegate(ScenePresence p) | 681 | Scene.ForEachRootClient(delegate(IClientAPI client) |
682 | { | 682 | { |
683 | if (p.UUID != senderID) | 683 | if (client.AgentId != senderID) |
684 | { | 684 | { |
685 | // make sure they are still there, we could be working down a long list | 685 | // make sure they are still there, we could be working down a long list |
686 | // Also make sure they are actually in the region | 686 | // Also make sure they are actually in the region |
687 | if (p != null && !p.IsChildAgent) | 687 | ScenePresence p; |
688 | if(Scene.TryGetScenePresence(client.AgentId, out p)) | ||
688 | { | 689 | { |
689 | if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) | 690 | if (!Scene.TeleportClientHome(p.UUID, p.ControllingClient)) |
690 | { | 691 | { |
@@ -952,9 +953,9 @@ namespace OpenSim.Region.CoreModules.World.Estate | |||
952 | 953 | ||
953 | public void sendRegionInfoPacketToAll() | 954 | public void sendRegionInfoPacketToAll() |
954 | { | 955 | { |
955 | Scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 956 | Scene.ForEachRootClient(delegate(IClientAPI client) |
956 | { | 957 | { |
957 | HandleRegionInfoRequest(sp.ControllingClient); | 958 | HandleRegionInfoRequest(client); |
958 | }); | 959 | }); |
959 | } | 960 | } |
960 | 961 | ||
diff --git a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs index d2c1289..a838e1e 100644 --- a/OpenSim/Region/CoreModules/World/Sun/SunModule.cs +++ b/OpenSim/Region/CoreModules/World/Sun/SunModule.cs | |||
@@ -488,9 +488,9 @@ namespace OpenSim.Region.CoreModules | |||
488 | 488 | ||
489 | private void SunUpdateToAllClients() | 489 | private void SunUpdateToAllClients() |
490 | { | 490 | { |
491 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 491 | m_scene.ForEachRootClient(delegate(IClientAPI client) |
492 | { | 492 | { |
493 | SunToClient(sp.ControllingClient); | 493 | SunToClient(client); |
494 | }); | 494 | }); |
495 | } | 495 | } |
496 | 496 | ||
diff --git a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs index bea5db1..a488725 100644 --- a/OpenSim/Region/CoreModules/World/Wind/WindModule.cs +++ b/OpenSim/Region/CoreModules/World/Wind/WindModule.cs | |||
@@ -435,9 +435,9 @@ namespace OpenSim.Region.CoreModules | |||
435 | m_frameLastUpdateClientArray = m_frame; | 435 | m_frameLastUpdateClientArray = m_frame; |
436 | } | 436 | } |
437 | 437 | ||
438 | m_scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 438 | m_scene.ForEachRootClient(delegate(IClientAPI client) |
439 | { | 439 | { |
440 | sp.ControllingClient.SendWindData(windSpeeds); | 440 | client.SendWindData(windSpeeds); |
441 | }); | 441 | }); |
442 | } | 442 | } |
443 | } | 443 | } |
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index cd5ac6c..1a3e3bb 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1460,12 +1460,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
1460 | /// <param name="stats">Stats on the Simulator's performance</param> | 1460 | /// <param name="stats">Stats on the Simulator's performance</param> |
1461 | private void SendSimStatsPackets(SimStats stats) | 1461 | private void SendSimStatsPackets(SimStats stats) |
1462 | { | 1462 | { |
1463 | ForEachRootScenePresence( | 1463 | ForEachRootClient(delegate(IClientAPI client) |
1464 | delegate(ScenePresence agent) | 1464 | { |
1465 | { | 1465 | client.SendSimStats(stats); |
1466 | agent.ControllingClient.SendSimStats(stats); | 1466 | }); |
1467 | } | ||
1468 | ); | ||
1469 | } | 1467 | } |
1470 | 1468 | ||
1471 | /// <summary> | 1469 | /// <summary> |
@@ -4387,35 +4385,32 @@ namespace OpenSim.Region.Framework.Scenes | |||
4387 | return m_sceneGraph.GetScenePresence(localID); | 4385 | return m_sceneGraph.GetScenePresence(localID); |
4388 | } | 4386 | } |
4389 | 4387 | ||
4388 | /// <summary> | ||
4389 | /// Returns true if scene presence is a child (no avatar in this scene) | ||
4390 | /// </summary> | ||
4391 | /// <param name="avatarID"></param> | ||
4392 | /// <returns></returns> | ||
4390 | public override bool PresenceChildStatus(UUID avatarID) | 4393 | public override bool PresenceChildStatus(UUID avatarID) |
4391 | { | 4394 | { |
4392 | ScenePresence cp = GetScenePresence(avatarID); | 4395 | ScenePresence sp; |
4393 | 4396 | return TryGetScenePresence(avatarID, out sp) && sp.IsChildAgent; | |
4394 | // FIXME: This is really crap - some logout code is relying on a NullReferenceException to halt its processing | ||
4395 | // This needs to be fixed properly by cleaning up the logout code. | ||
4396 | //if (cp != null) | ||
4397 | // return cp.IsChildAgent; | ||
4398 | |||
4399 | //return false; | ||
4400 | |||
4401 | return cp.IsChildAgent; | ||
4402 | } | 4397 | } |
4403 | 4398 | ||
4404 | /// <summary> | 4399 | /// <summary> |
4405 | /// Performs action on all ROOT (not child) scene presences. | 4400 | /// Performs action on all avatars in the scene (root scene presences) |
4406 | /// This is just a shortcut function since frequently actions only appy to root SPs | 4401 | /// Avatars may be an NPC or a 'real' client. |
4407 | /// </summary> | 4402 | /// </summary> |
4408 | /// <param name="action"></param> | 4403 | /// <param name="action"></param> |
4409 | public void ForEachRootScenePresence(Action<ScenePresence> action) | 4404 | public void ForEachRootScenePresence(Action<ScenePresence> action) |
4410 | { | 4405 | { |
4411 | if(m_sceneGraph != null) | 4406 | if(m_sceneGraph != null) |
4412 | { | 4407 | { |
4413 | m_sceneGraph.ForEachRootScenePresence(action); | 4408 | m_sceneGraph.ForEachAvatar(action); |
4414 | } | 4409 | } |
4415 | } | 4410 | } |
4416 | 4411 | ||
4417 | /// <summary> | 4412 | /// <summary> |
4418 | /// Performs action on all scene presences. | 4413 | /// Performs action on all scene presences (root and child) |
4419 | /// </summary> | 4414 | /// </summary> |
4420 | /// <param name="action"></param> | 4415 | /// <param name="action"></param> |
4421 | public void ForEachScenePresence(Action<ScenePresence> action) | 4416 | public void ForEachScenePresence(Action<ScenePresence> action) |
@@ -4427,25 +4422,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
4427 | } | 4422 | } |
4428 | 4423 | ||
4429 | /// <summary> | 4424 | /// <summary> |
4430 | /// Perform the given action for each object | ||
4431 | /// </summary> | ||
4432 | /// <param name="action"></param> | ||
4433 | // public void ForEachObject(Action<SceneObjectGroup> action) | ||
4434 | // { | ||
4435 | // List<SceneObjectGroup> presenceList; | ||
4436 | // | ||
4437 | // lock (m_sceneObjects) | ||
4438 | // { | ||
4439 | // presenceList = new List<SceneObjectGroup>(m_sceneObjects.Values); | ||
4440 | // } | ||
4441 | // | ||
4442 | // foreach (SceneObjectGroup presence in presenceList) | ||
4443 | // { | ||
4444 | // action(presence); | ||
4445 | // } | ||
4446 | // } | ||
4447 | |||
4448 | /// <summary> | ||
4449 | /// Get a group via its UUID | 4425 | /// Get a group via its UUID |
4450 | /// </summary> | 4426 | /// </summary> |
4451 | /// <param name="fullID"></param> | 4427 | /// <param name="fullID"></param> |
@@ -4517,6 +4493,22 @@ namespace OpenSim.Region.Framework.Scenes | |||
4517 | return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar); | 4493 | return m_sceneGraph.TryGetAvatarByName(avatarName, out avatar); |
4518 | } | 4494 | } |
4519 | 4495 | ||
4496 | /// <summary> | ||
4497 | /// Perform an action on all clients with an avatar in this scene (root only) | ||
4498 | /// </summary> | ||
4499 | /// <param name="action"></param> | ||
4500 | public void ForEachRootClient(Action<IClientAPI> action) | ||
4501 | { | ||
4502 | ForEachRootScenePresence(delegate(ScenePresence presence) | ||
4503 | { | ||
4504 | action(presence.ControllingClient); | ||
4505 | }); | ||
4506 | } | ||
4507 | |||
4508 | /// <summary> | ||
4509 | /// Perform an action on all clients connected to the region (root and child) | ||
4510 | /// </summary> | ||
4511 | /// <param name="action"></param> | ||
4520 | public void ForEachClient(Action<IClientAPI> action) | 4512 | public void ForEachClient(Action<IClientAPI> action) |
4521 | { | 4513 | { |
4522 | m_clientManager.ForEachSync(action); | 4514 | m_clientManager.ForEachSync(action); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneGraph.cs b/OpenSim/Region/Framework/Scenes/SceneGraph.cs index e1fde64..d780fb3 100644 --- a/OpenSim/Region/Framework/Scenes/SceneGraph.cs +++ b/OpenSim/Region/Framework/Scenes/SceneGraph.cs | |||
@@ -1265,7 +1265,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1265 | /// This is just a shortcut function since frequently actions only appy to root SPs | 1265 | /// This is just a shortcut function since frequently actions only appy to root SPs |
1266 | /// </summary> | 1266 | /// </summary> |
1267 | /// <param name="action"></param> | 1267 | /// <param name="action"></param> |
1268 | public void ForEachRootScenePresence(Action<ScenePresence> action) | 1268 | public void ForEachAvatar(Action<ScenePresence> action) |
1269 | { | 1269 | { |
1270 | ForEachScenePresence(delegate(ScenePresence sp) | 1270 | ForEachScenePresence(delegate(ScenePresence sp) |
1271 | { | 1271 | { |
diff --git a/OpenSim/Region/Framework/Scenes/SceneManager.cs b/OpenSim/Region/Framework/Scenes/SceneManager.cs index 3bfd866..eeb087f 100644 --- a/OpenSim/Region/Framework/Scenes/SceneManager.cs +++ b/OpenSim/Region/Framework/Scenes/SceneManager.cs | |||
@@ -458,16 +458,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
458 | ForEachCurrentScene( | 458 | ForEachCurrentScene( |
459 | delegate(Scene scene) | 459 | delegate(Scene scene) |
460 | { | 460 | { |
461 | scene.ForEachRootScenePresence(delegate(ScenePresence scenePresence) | 461 | scene.ForEachRootClient(delegate(IClientAPI client) |
462 | { | 462 | { |
463 | if (name == null || scenePresence.Name == name) | 463 | if (name == null || client.Name == name) |
464 | { | 464 | { |
465 | m_log.DebugFormat("Packet debug for {0} {1} set to {2}", | 465 | m_log.DebugFormat("Packet debug for {0} {1} set to {2}", |
466 | scenePresence.Firstname, | 466 | client.FirstName, |
467 | scenePresence.Lastname, | 467 | client.LastName, |
468 | newDebug); | 468 | newDebug); |
469 | 469 | ||
470 | scenePresence.ControllingClient.DebugPacketLevel = newDebug; | 470 | client.DebugPacketLevel = newDebug; |
471 | } | 471 | } |
472 | }); | 472 | }); |
473 | } | 473 | } |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 6204b4f..84d0e71 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -1473,7 +1473,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1473 | { | 1473 | { |
1474 | SceneObjectPart part = parts[i]; | 1474 | SceneObjectPart part = parts[i]; |
1475 | 1475 | ||
1476 | Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1476 | Scene.ForEachRootScenePresence(delegate(ScenePresence avatar) |
1477 | { | 1477 | { |
1478 | if (avatar.ParentID == LocalId) | 1478 | if (avatar.ParentID == LocalId) |
1479 | avatar.StandUp(); | 1479 | avatar.StandUp(); |
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs index 948518a..c8f28c7 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectPart.cs | |||
@@ -1025,7 +1025,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1025 | public PrimitiveBaseShape Shape | 1025 | public PrimitiveBaseShape Shape |
1026 | { | 1026 | { |
1027 | get { return m_shape; } | 1027 | get { return m_shape; } |
1028 | set { m_shape = value; } | 1028 | set { m_shape = value;} |
1029 | } | 1029 | } |
1030 | 1030 | ||
1031 | /// <summary> | 1031 | /// <summary> |
@@ -1389,12 +1389,12 @@ namespace OpenSim.Region.Framework.Scenes | |||
1389 | /// <param name="AgentID"></param> | 1389 | /// <param name="AgentID"></param> |
1390 | private void SendRootPartPropertiesToClient(UUID AgentID) | 1390 | private void SendRootPartPropertiesToClient(UUID AgentID) |
1391 | { | 1391 | { |
1392 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence avatar) | 1392 | m_parentGroup.Scene.ForEachClient(delegate(IClientAPI client) |
1393 | { | 1393 | { |
1394 | // Ugly reference :( | 1394 | // Ugly reference :( |
1395 | if (avatar.UUID == AgentID) | 1395 | if (client.AgentId == AgentID) |
1396 | { | 1396 | { |
1397 | m_parentGroup.SendPropertiesToClient(avatar.ControllingClient); | 1397 | m_parentGroup.SendPropertiesToClient(client); |
1398 | } | 1398 | } |
1399 | }); | 1399 | }); |
1400 | } | 1400 | } |
@@ -1514,9 +1514,9 @@ namespace OpenSim.Region.Framework.Scenes | |||
1514 | if (volume < 0) | 1514 | if (volume < 0) |
1515 | volume = 0; | 1515 | volume = 0; |
1516 | 1516 | ||
1517 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence sp) | 1517 | m_parentGroup.Scene.ForEachRootClient(delegate(IClientAPI client) |
1518 | { | 1518 | { |
1519 | sp.ControllingClient.SendAttachedSoundGainChange(UUID, (float)volume); | 1519 | client.SendAttachedSoundGainChange(UUID, (float)volume); |
1520 | }); | 1520 | }); |
1521 | } | 1521 | } |
1522 | 1522 | ||
@@ -2270,7 +2270,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2270 | } | 2270 | } |
2271 | else | 2271 | else |
2272 | { | 2272 | { |
2273 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2273 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) |
2274 | { | 2274 | { |
2275 | if (av.LocalId == localId) | 2275 | if (av.LocalId == localId) |
2276 | { | 2276 | { |
@@ -2401,7 +2401,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2401 | } | 2401 | } |
2402 | else | 2402 | else |
2403 | { | 2403 | { |
2404 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2404 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) |
2405 | { | 2405 | { |
2406 | if (av.LocalId == localId) | 2406 | if (av.LocalId == localId) |
2407 | { | 2407 | { |
@@ -2524,7 +2524,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2524 | } | 2524 | } |
2525 | else | 2525 | else |
2526 | { | 2526 | { |
2527 | m_parentGroup.Scene.ForEachScenePresence(delegate(ScenePresence av) | 2527 | m_parentGroup.Scene.ForEachRootScenePresence(delegate(ScenePresence av) |
2528 | { | 2528 | { |
2529 | if (av.LocalId == localId) | 2529 | if (av.LocalId == localId) |
2530 | { | 2530 | { |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index aa1c15e..9bf5bea 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -1072,7 +1072,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
1072 | } | 1072 | } |
1073 | 1073 | ||
1074 | // send the animations of the other presences to me | 1074 | // send the animations of the other presences to me |
1075 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) | 1075 | m_scene.ForEachRootScenePresence(delegate(ScenePresence presence) |
1076 | { | 1076 | { |
1077 | if (presence != this) | 1077 | if (presence != this) |
1078 | presence.Animator.SendAnimPackToClient(ControllingClient); | 1078 | presence.Animator.SendAnimPackToClient(ControllingClient); |
diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index f8120aa..28f04b3 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs | |||
@@ -123,15 +123,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance | |||
123 | { | 123 | { |
124 | foreach (Scene scene in m_scenes.Values) | 124 | foreach (Scene scene in m_scenes.Values) |
125 | { | 125 | { |
126 | scene.ForEachScenePresence( | 126 | scene.ForEachRootScenePresence( |
127 | delegate(ScenePresence sp) | 127 | delegate(ScenePresence sp) |
128 | { | 128 | { |
129 | if (sp.ControllingClient is LLClientView && !((LLClientView)sp.ControllingClient).ChildAgentStatus()) | 129 | bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); |
130 | { | 130 | MainConsole.Instance.OutputFormat( |
131 | bool bakedTextureValid = scene.AvatarFactory.ValidateBakedTextureCache(sp); | 131 | "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); |
132 | MainConsole.Instance.OutputFormat( | ||
133 | "{0} baked appearance texture is {1}", sp.Name, bakedTextureValid ? "OK" : "corrupt"); | ||
134 | } | ||
135 | }); | 132 | }); |
136 | } | 133 | } |
137 | } | 134 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index 45a5f9a..ff91cfa 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -1827,7 +1827,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1827 | if (flexi) | 1827 | if (flexi) |
1828 | { | 1828 | { |
1829 | part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do | 1829 | part.Shape.FlexiEntry = true; // this setting flexi true isn't working, but the below parameters do |
1830 | // work once the prim is already flexi | 1830 | // work once the prim is already flexi |
1831 | part.Shape.FlexiSoftness = softness; | 1831 | part.Shape.FlexiSoftness = softness; |
1832 | part.Shape.FlexiGravity = gravity; | 1832 | part.Shape.FlexiGravity = gravity; |
1833 | part.Shape.FlexiDrag = friction; | 1833 | part.Shape.FlexiDrag = friction; |
@@ -1837,10 +1837,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
1837 | part.Shape.FlexiForceY = (float)Force.y; | 1837 | part.Shape.FlexiForceY = (float)Force.y; |
1838 | part.Shape.FlexiForceZ = (float)Force.z; | 1838 | part.Shape.FlexiForceZ = (float)Force.z; |
1839 | part.Shape.PathCurve = 0x80; | 1839 | part.Shape.PathCurve = 0x80; |
1840 | part.ParentGroup.HasGroupChanged = true; | ||
1841 | part.ScheduleFullUpdate(); | ||
1840 | } | 1842 | } |
1841 | |||
1842 | part.ParentGroup.HasGroupChanged = true; | ||
1843 | part.ScheduleFullUpdate(); | ||
1844 | } | 1843 | } |
1845 | 1844 | ||
1846 | /// <summary> | 1845 | /// <summary> |
@@ -11199,7 +11198,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
11199 | 11198 | ||
11200 | if (checkAgents) | 11199 | if (checkAgents) |
11201 | { | 11200 | { |
11202 | World.ForEachScenePresence(delegate(ScenePresence sp) | 11201 | World.ForEachRootScenePresence(delegate(ScenePresence sp) |
11203 | { | 11202 | { |
11204 | if (sp.AbsolutePosition.ApproxEquals(posToCheck, sp.PhysicsActor.Size.X)) | 11203 | if (sp.AbsolutePosition.ApproxEquals(posToCheck, sp.PhysicsActor.Size.X)) |
11205 | { | 11204 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 6de0773..ed5a2fe 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -510,7 +510,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
510 | senseEntity(sp); | 510 | senseEntity(sp); |
511 | if ((ts.type & AGENT_BY_USERNAME) != 0) | 511 | if ((ts.type & AGENT_BY_USERNAME) != 0) |
512 | { | 512 | { |
513 | m_CmdManager.m_ScriptEngine.World.ForEachScenePresence( | 513 | m_CmdManager.m_ScriptEngine.World.ForEachRootScenePresence( |
514 | delegate (ScenePresence ssp) | 514 | delegate (ScenePresence ssp) |
515 | { | 515 | { |
516 | if (ssp.Lastname == "Resident") | 516 | if (ssp.Lastname == "Resident") |
@@ -529,7 +529,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
529 | } | 529 | } |
530 | else | 530 | else |
531 | { | 531 | { |
532 | m_CmdManager.m_ScriptEngine.World.ForEachScenePresence(senseEntity); | 532 | m_CmdManager.m_ScriptEngine.World.ForEachRootScenePresence(senseEntity); |
533 | } | 533 | } |
534 | return sensedEntities; | 534 | return sensedEntities; |
535 | } | 535 | } |