Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

iar_mods
BlueWall 2012-02-10 16:28:11 -05:00
commit ee078f717a
1 changed files with 20 additions and 9 deletions

View File

@ -445,17 +445,28 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Plugins
Vector3 toRegionPos; Vector3 toRegionPos;
double dis; double dis;
Action<ScenePresence> senseEntity = new Action<ScenePresence>(delegate(ScenePresence presence) Action<ScenePresence> senseEntity = new Action<ScenePresence>(presence =>
{ {
if ((ts.type & NPC) == 0 if ((ts.type & NPC) == 0 && presence.PresenceType == PresenceType.Npc)
&& presence.PresenceType == PresenceType.Npc {
&& !npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent) INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
return; if (npcData == null || !npcData.SenseAsAgent)
return;
}
if ((ts.type & AGENT) == 0 if ((ts.type & AGENT) == 0)
&& (presence.PresenceType == PresenceType.User {
|| npcModule.GetNPC(presence.UUID, presence.Scene).SenseAsAgent)) if (presence.PresenceType == PresenceType.User)
return; {
return;
}
else
{
INPC npcData = npcModule.GetNPC(presence.UUID, presence.Scene);
if (npcData != null && npcData.SenseAsAgent)
return;
}
}
if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0) if (presence.IsDeleted || presence.IsChildAgent || presence.GodLevel > 0.0)
return; return;