diff options
author | Melanie | 2012-01-28 01:01:23 +0000 |
---|---|---|
committer | Melanie | 2012-01-28 01:01:23 +0000 |
commit | 428407c5e409f0734ce909d5db9b1114a92cba35 (patch) | |
tree | b1fc56efd4d8f9251811bfdb3df434534787b1c8 /OpenSim/Region/ScriptEngine/Shared/Api/Implementation | |
parent | Merge branch 'master' into careminster (diff) | |
parent | Remove IClientAPI from the money module. It was only used to pass in the (diff) | |
download | opensim-SC-428407c5e409f0734ce909d5db9b1114a92cba35.zip opensim-SC-428407c5e409f0734ce909d5db9b1114a92cba35.tar.gz opensim-SC-428407c5e409f0734ce909d5db9b1114a92cba35.tar.bz2 opensim-SC-428407c5e409f0734ce909d5db9b1114a92cba35.tar.xz |
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared/Api/Implementation')
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | 9 |
2 files changed, 17 insertions, 6 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index d059bcb..1cb052d 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2242,7 +2242,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2242 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2242 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2243 | m_host.AddScriptLPS(1); | 2243 | m_host.AddScriptLPS(1); |
2244 | 2244 | ||
2245 | return NpcCreate(firstname, lastname, position, notecard, true); | 2245 | return NpcCreate(firstname, lastname, position, notecard, false, true); |
2246 | } | 2246 | } |
2247 | 2247 | ||
2248 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) | 2248 | public LSL_Key osNpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, int options) |
@@ -2250,10 +2250,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2250 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); | 2250 | CheckThreatLevel(ThreatLevel.High, "osNpcCreate"); |
2251 | m_host.AddScriptLPS(1); | 2251 | m_host.AddScriptLPS(1); |
2252 | 2252 | ||
2253 | return NpcCreate(firstname, lastname, position, notecard, (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0); | 2253 | return NpcCreate( |
2254 | firstname, lastname, position, notecard, | ||
2255 | (options & ScriptBaseClass.OS_NPC_NOT_OWNED) == 0, | ||
2256 | (options & ScriptBaseClass.OS_NPC_SENSE_AS_AGENT) == 0); | ||
2254 | } | 2257 | } |
2255 | 2258 | ||
2256 | private LSL_Key NpcCreate(string firstname, string lastname, LSL_Vector position, string notecard, bool owned) | 2259 | private LSL_Key NpcCreate( |
2260 | string firstname, string lastname, LSL_Vector position, string notecard, bool owned, bool senseAsAgent) | ||
2257 | { | 2261 | { |
2258 | if (!owned) | 2262 | if (!owned) |
2259 | OSSLError("Unowned NPCs are unsupported"); | 2263 | OSSLError("Unowned NPCs are unsupported"); |
@@ -2301,7 +2305,9 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2301 | lastname, | 2305 | lastname, |
2302 | new Vector3((float) position.x, (float) position.y, (float) position.z), | 2306 | new Vector3((float) position.x, (float) position.y, (float) position.z), |
2303 | ownerID, | 2307 | ownerID, |
2304 | World,appearance); | 2308 | senseAsAgent, |
2309 | World, | ||
2310 | appearance); | ||
2305 | 2311 | ||
2306 | ScenePresence sp; | 2312 | ScenePresence sp; |
2307 | if (World.TryGetScenePresence(x, out sp)) | 2313 | if (World.TryGetScenePresence(x, out sp)) |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs index dddf913..2a0ce44 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/Plugins/SensorRepeat.cs | |||
@@ -452,9 +452,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins | |||
452 | 452 | ||
453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) | 453 | Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) |
454 | { | 454 | { |
455 | if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc) | 455 | if ((ts.type & NPC) == 0 |
456 | && presence.PresenceType == PresenceType.Npc | ||
457 | && !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) | ||
456 | return; | 458 | return; |
457 | if ((ts.type & AGENT) == 0 && presence.PresenceType == PresenceType.User) | 459 | |
460 | if ((ts.type & AGENT) == 0 | ||
461 | && (presence.PresenceType == PresenceType.User | ||
462 | || npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) | ||
458 | return; | 463 | return; |
459 | 464 | ||
460 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) | 465 | if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) |