Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
ee078f717a
|
@ -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);
|
||||||
|
if (npcData == null || !npcData.SenseAsAgent)
|
||||||
return;
|
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;
|
||||||
|
|
Loading…
Reference in New Issue