diff options
author | KittoFlora | 2009-10-27 22:42:55 +0100 |
---|---|---|
committer | KittoFlora | 2009-10-27 22:42:55 +0100 |
commit | 1113b3b6ebba3e358326a7be90b338d8c95af688 (patch) | |
tree | d923340600e5a2699ceaceeb52fd6c45994f334a /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins | |
parent | llRotLookAt Pt 2 (diff) | |
parent | Merge branch 'master' into vehicles (diff) | |
download | opensim-SC-1113b3b6ebba3e358326a7be90b338d8c95af688.zip opensim-SC-1113b3b6ebba3e358326a7be90b338d8c95af688.tar.gz opensim-SC-1113b3b6ebba3e358326a7be90b338d8c95af688.tar.bz2 opensim-SC-1113b3b6ebba3e358326a7be90b338d8c95af688.tar.xz |
Merge branch 'vehicles' into tests
Conflicts:
OpenSim/Region/Physics/Manager/PhysicsActor.cs
OpenSim/Region/Physics/OdePlugin/ODEPrim.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index a09c8db..b75a2e4 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -404,7 +404,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
404 | 404 | ||
405 | private List<SensedEntity> doAgentSensor(SenseRepeatClass ts) | 405 | private List<SensedEntity> doAgentSensor(SenseRepeatClass ts) |
406 | { | 406 | { |
407 | List<ScenePresence> Presences; | 407 | List<ScenePresence> presences; |
408 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); | 408 | List<SensedEntity> sensedEntities = new List<SensedEntity>(); |
409 | 409 | ||
410 | // If this is an avatar sense by key try to get them directly | 410 | // If this is an avatar sense by key try to get them directly |
@@ -414,16 +414,16 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
414 | ScenePresence p = m_CmdManager.m_ScriptEngine.World.GetScenePresence(ts.keyID); | 414 | ScenePresence p = m_CmdManager.m_ScriptEngine.World.GetScenePresence(ts.keyID); |
415 | if (p == null) | 415 | if (p == null) |
416 | return sensedEntities; | 416 | return sensedEntities; |
417 | Presences = new List<ScenePresence>(); | 417 | presences = new List<ScenePresence>(); |
418 | Presences.Add(p); | 418 | presences.Add(p); |
419 | } | 419 | } |
420 | else | 420 | else |
421 | { | 421 | { |
422 | Presences = m_CmdManager.m_ScriptEngine.World.GetScenePresences(); | 422 | presences = new List<ScenePresence>(m_CmdManager.m_ScriptEngine.World.GetScenePresences()); |
423 | } | 423 | } |
424 | 424 | ||
425 | // If nobody about quit fast | 425 | // If nobody about quit fast |
426 | if (Presences.Count == 0) | 426 | if (presences.Count == 0) |
427 | return sensedEntities; | 427 | return sensedEntities; |
428 | 428 | ||
429 | SceneObjectPart SensePoint = ts.host; | 429 | SceneObjectPart SensePoint = ts.host; |
@@ -440,8 +440,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
440 | Vector3 toRegionPos; | 440 | Vector3 toRegionPos; |
441 | double dis; | 441 | double dis; |
442 | 442 | ||
443 | foreach (ScenePresence presence in Presences) | 443 | for (int i = 0; i < presences.Count; i++) |
444 | { | 444 | { |
445 | ScenePresence presence = presences[i]; | ||
445 | bool keep = true; | 446 | bool keep = true; |
446 | 447 | ||
447 | if (presence.IsDeleted) | 448 | if (presence.IsDeleted) |
@@ -515,16 +516,19 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
515 | { | 516 | { |
516 | List<Object> data = new List<Object>(); | 517 | List<Object> data = new List<Object>(); |
517 | 518 | ||
518 | foreach (SenseRepeatClass ts in SenseRepeaters) | 519 | lock (SenseRepeatListLock) |
519 | { | 520 | { |
520 | if (ts.itemID == itemID) | 521 | foreach (SenseRepeatClass ts in SenseRepeaters) |
521 | { | 522 | { |
522 | data.Add(ts.interval); | 523 | if (ts.itemID == itemID) |
523 | data.Add(ts.name); | 524 | { |
524 | data.Add(ts.keyID); | 525 | data.Add(ts.interval); |
525 | data.Add(ts.type); | 526 | data.Add(ts.name); |
526 | data.Add(ts.range); | 527 | data.Add(ts.keyID); |
527 | data.Add(ts.arc); | 528 | data.Add(ts.type); |
529 | data.Add(ts.range); | ||
530 | data.Add(ts.arc); | ||
531 | } | ||
528 | } | 532 | } |
529 | } | 533 | } |
530 | return data.ToArray(); | 534 | return data.ToArray(); |