aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/OptionalModules/World
diff options
context:
space:
mode:
authorMelanie2012-04-18 19:51:27 +0200
committerMelanie2012-04-18 19:51:27 +0200
commit5936e0c3760922e09099b65e3db522055db2286c (patch)
tree7d7fd75b7c85a57aa01131f413266dd7ef9d1191 /OpenSim/Region/OptionalModules/World
parentPrevent objects rezzed in sim from being seen as attachments and becoming une... (diff)
downloadopensim-SC_OLD-5936e0c3760922e09099b65e3db522055db2286c.zip
opensim-SC_OLD-5936e0c3760922e09099b65e3db522055db2286c.tar.gz
opensim-SC_OLD-5936e0c3760922e09099b65e3db522055db2286c.tar.bz2
opensim-SC_OLD-5936e0c3760922e09099b65e3db522055db2286c.tar.xz
Allow scripts in attachments owned by the NPC to control the NPC
Diffstat (limited to 'OpenSim/Region/OptionalModules/World')
-rw-r--r--OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs8
1 files changed, 7 insertions, 1 deletions
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
index 68f21c8..ebf5e84 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs
@@ -323,9 +323,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
323 { 323 {
324 NPCAvatar av; 324 NPCAvatar av;
325 if (m_avatars.TryGetValue(npcID, out av)) 325 if (m_avatars.TryGetValue(npcID, out av))
326 {
327 if (npcID == callerID)
328 return true;
326 return CheckPermissions(av, callerID); 329 return CheckPermissions(av, callerID);
330 }
327 else 331 else
332 {
328 return false; 333 return false;
334 }
329 } 335 }
330 } 336 }
331 337
@@ -337,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
337 /// <returns>true if they do, false if they don't.</returns> 343 /// <returns>true if they do, false if they don't.</returns>
338 private bool CheckPermissions(NPCAvatar av, UUID callerID) 344 private bool CheckPermissions(NPCAvatar av, UUID callerID)
339 { 345 {
340 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID; 346 return callerID == UUID.Zero || av.OwnerID == UUID.Zero || av.OwnerID == callerID || av.AgentId == callerID;
341 } 347 }
342 } 348 }
343} 349}