diff options
author | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
---|---|---|
committer | Melanie Thielker | 2014-06-21 00:39:55 +0200 |
commit | 159fcbf150b7da0e229b29aa7b94793484543d12 (patch) | |
tree | b8c0ff3b4c758a3fba8315b556c923ef4c02a185 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |
parent | Merge commit '68c8633ba18f0a11cfc0ed04d1d0c7c59e6cec76' (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.zip opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.gz opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.bz2 opensim-SC_OLD-159fcbf150b7da0e229b29aa7b94793484543d12.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster
Conflicts:
OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index a47e452..181399d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -353,6 +353,11 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
353 | // Position of a sensor in a child prim attached to an avatar | 353 | // Position of a sensor in a child prim attached to an avatar |
354 | // will be still wrong. | 354 | // will be still wrong. |
355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 355 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
356 | |||
357 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
358 | if (avatar == null) | ||
359 | return sensedEntities; | ||
360 | |||
356 | fromRegionPos = avatar.AbsolutePosition; | 361 | fromRegionPos = avatar.AbsolutePosition; |
357 | q = avatar.Rotation; | 362 | q = avatar.Rotation; |
358 | } | 363 | } |
@@ -363,7 +368,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
363 | 368 | ||
364 | Vector3 ZeroVector = new Vector3(0, 0, 0); | 369 | Vector3 ZeroVector = new Vector3(0, 0, 0); |
365 | 370 | ||
366 | bool nameSearch = (ts.name != null && ts.name != ""); | 371 | bool nameSearch = !string.IsNullOrEmpty(ts.name); |
367 | 372 | ||
368 | foreach (EntityBase ent in Entities) | 373 | foreach (EntityBase ent in Entities) |
369 | { | 374 | { |
@@ -483,6 +488,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
483 | // Position of a sensor in a child prim attached to an avatar | 488 | // Position of a sensor in a child prim attached to an avatar |
484 | // will be still wrong. | 489 | // will be still wrong. |
485 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); | 490 | ScenePresence avatar = m_CmdManager.m_ScriptEngine.World.GetScenePresence(SensePoint.ParentGroup.AttachedAvatar); |
491 | |||
492 | // Don't proceed if the avatar for this attachment has since been removed from the scene. | ||
486 | if (avatar == null) | 493 | if (avatar == null) |
487 | return sensedEntities; | 494 | return sensedEntities; |
488 | fromRegionPos = avatar.AbsolutePosition; | 495 | fromRegionPos = avatar.AbsolutePosition; |
@@ -601,7 +608,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
601 | return sensedEntities; | 608 | return sensedEntities; |
602 | senseEntity(sp); | 609 | senseEntity(sp); |
603 | } | 610 | } |
604 | else if (ts.name != null && ts.name != "") | 611 | else if (!string.IsNullOrEmpty(ts.name)) |
605 | { | 612 | { |
606 | ScenePresence sp; | 613 | ScenePresence sp; |
607 | // Try lookup by name will return if/when found | 614 | // Try lookup by name will return if/when found |