diff options
author | UbitUmarov | 2016-06-28 23:30:04 +0100 |
---|---|---|
committer | UbitUmarov | 2016-06-28 23:30:04 +0100 |
commit | 90b825cda8eac02d9bb0af0dd734a662014b4d26 (patch) | |
tree | fa12574b7df2b386951860ffd275772111f95daa /OpenSim/Region/CoreModules/World | |
parent | fix NPCs OS_NPC_OBJECT_GROUP option. group ID needs to be set during creation... (diff) | |
download | opensim-SC_OLD-90b825cda8eac02d9bb0af0dd734a662014b4d26.zip opensim-SC_OLD-90b825cda8eac02d9bb0af0dd734a662014b4d26.tar.gz opensim-SC_OLD-90b825cda8eac02d9bb0af0dd734a662014b4d26.tar.bz2 opensim-SC_OLD-90b825cda8eac02d9bb0af0dd734a662014b4d26.tar.xz |
if a NPC is owned, allow access if ownerID matchs parcel owner or it is in the access list. option OS_NPC_OBJECT_GROUP it still needed if access is by group (this option should also work with not owned NPC) NEEDS TESTING, may prove to be a bad solution
Diffstat (limited to 'OpenSim/Region/CoreModules/World')
-rw-r--r-- | OpenSim/Region/CoreModules/World/Land/LandObject.cs | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/OpenSim/Region/CoreModules/World/Land/LandObject.cs b/OpenSim/Region/CoreModules/World/Land/LandObject.cs index 6b37dad..4cea7bb 100644 --- a/OpenSim/Region/CoreModules/World/Land/LandObject.cs +++ b/OpenSim/Region/CoreModules/World/Land/LandObject.cs | |||
@@ -694,7 +694,30 @@ namespace OpenSim.Region.CoreModules.World.Land | |||
694 | if (HasGroupAccess(avatar)) | 694 | if (HasGroupAccess(avatar)) |
695 | return false; | 695 | return false; |
696 | 696 | ||
697 | return !IsInLandAccessList(avatar); | 697 | if(IsInLandAccessList(avatar)) |
698 | return false; | ||
699 | |||
700 | // check for a NPC | ||
701 | ScenePresence sp; | ||
702 | if (!m_scene.TryGetScenePresence(avatar, out sp)) | ||
703 | return true; | ||
704 | |||
705 | if(sp==null || !sp.isNPC) | ||
706 | return true; | ||
707 | |||
708 | INPC npccli = (INPC)sp.ControllingClient; | ||
709 | if(npccli== null) | ||
710 | return true; | ||
711 | |||
712 | UUID owner = npccli.Owner; | ||
713 | |||
714 | if(owner == UUID.Zero) | ||
715 | return true; | ||
716 | |||
717 | if (owner == LandData.OwnerID) | ||
718 | return false; | ||
719 | |||
720 | return !IsInLandAccessList(owner); | ||
698 | } | 721 | } |
699 | 722 | ||
700 | public bool IsInLandAccessList(UUID avatar) | 723 | public bool IsInLandAccessList(UUID avatar) |