diff options
Diffstat (limited to 'OpenSim/Region/OptionalModules/World/NPC')
-rw-r--r-- | OpenSim/Region/OptionalModules/World/NPC/NPCModule.cs | 8 |
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 | } |