diff options
author | UbitUmarov | 2012-02-15 03:51:30 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-15 03:51:30 +0000 |
commit | 04279e36d1bc01f966940eb8cc0457064356fced (patch) | |
tree | bff74b33a2cf072877e8f1d876944905399d4be6 /OpenSim/Region/ScriptEngine | |
parent | remove drawstuff from ubitode (diff) | |
parent | Merge branch 'master' of ssh://melanie@3dhosting.de/var/git/careminster into ... (diff) | |
download | opensim-SC-04279e36d1bc01f966940eb8cc0457064356fced.zip opensim-SC-04279e36d1bc01f966940eb8cc0457064356fced.tar.gz opensim-SC-04279e36d1bc01f966940eb8cc0457064356fced.tar.bz2 opensim-SC-04279e36d1bc01f966940eb8cc0457064356fced.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Region/ScriptEngine')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 29 |
2 files changed, 29 insertions, 12 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index b0b1b16..1529140 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -2188,7 +2188,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2188 | if (part.ParentGroup.RootPart == part) | 2188 | if (part.ParentGroup.RootPart == part) |
2189 | { | 2189 | { |
2190 | SceneObjectGroup parent = part.ParentGroup; | 2190 | SceneObjectGroup parent = part.ParentGroup; |
2191 | parent.UpdateGroupPosition(new Vector3((float)toPos.x, (float)toPos.y, (float)toPos.z)); | 2191 | Util.FireAndForget(delegate(object x) { |
2192 | parent.UpdateGroupPosition(new Vector3((float)toPos.x, (float)toPos.y, (float)toPos.z)); | ||
2193 | }); | ||
2192 | } | 2194 | } |
2193 | else | 2195 | else |
2194 | { | 2196 | { |
@@ -7973,7 +7975,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7973 | if (part.ParentGroup.RootPart == part) | 7975 | if (part.ParentGroup.RootPart == part) |
7974 | { | 7976 | { |
7975 | SceneObjectGroup parent = part.ParentGroup; | 7977 | SceneObjectGroup parent = part.ParentGroup; |
7976 | parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); | 7978 | Util.FireAndForget(delegate(object x) { |
7979 | parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); | ||
7980 | }); | ||
7977 | } | 7981 | } |
7978 | else | 7982 | else |
7979 | { | 7983 | { |
@@ -7990,7 +7994,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
7990 | if (part.ParentGroup.RootPart == part) | 7994 | if (part.ParentGroup.RootPart == part) |
7991 | { | 7995 | { |
7992 | SceneObjectGroup parent = part.ParentGroup; | 7996 | SceneObjectGroup parent = part.ParentGroup; |
7993 | parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); | 7997 | Util.FireAndForget(delegate(object x) { |
7998 | parent.UpdateGroupPosition(new Vector3((float)currentPosition.x, (float)currentPosition.y, (float)currentPosition.z)); | ||
7999 | }); | ||
7994 | } | 8000 | } |
7995 | else | 8001 | else |
7996 | { | 8002 | { |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index 2a0ce44..5c200d6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -450,17 +450,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
450 | Vector3 toRegionPos; | 450 | Vector3 toRegionPos; |
451 | double dis; | 451 | double dis; |
452 | 452 | ||
453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) | 453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence => |
454 | { | 454 | { |
455 | if ((ts.type & NPC) == 0 | 455 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) |
456 | && presence.PresenceType == PresenceType.Npc | 456 | { |
457 | && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) | 457 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); |
458 | return; | 458 | if (npcData == null || !npcData.SenseAsAgent) |
459 | return; | ||
460 | } | ||
459 | 461 | ||
460 | if ((ts.type & AGENT) == 0 | 462 | if ((ts.type & AGENT) == 0) |
461 | && (presence.PresenceType == PresenceType.User | 463 | { |
462 | || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) | 464 | if (presence.PresenceType == PresenceType.User) |
463 | return; | 465 | { |
466 | return; | ||
467 | } | ||
468 | else | ||
469 | { | ||
470 | INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene); | ||
471 | if (npcData != null && npcData.SenseAsAgent) | ||
472 | return; | ||
473 | } | ||
474 | } | ||
464 | 475 | ||
465 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 476 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) |
466 | return; | 477 | return; |