Change improperly named isNPC to be IsNPC as a property should be uppercase

melanie
Melanie Thielker 2017-01-07 20:30:51 +00:00
parent c41616b771
commit 6d44ee9099
11 changed files with 27 additions and 27 deletions

View File

@ -56,7 +56,7 @@ namespace OpenSim.Framework
bool IsChildAgent { get; } bool IsChildAgent { get; }
bool IsInTransit { get; } bool IsInTransit { get; }
bool isNPC { get;} bool IsNPC { get;}
bool Invulnerable { get; set; } bool Invulnerable { get; set; }
/// <summary> /// <summary>
@ -83,4 +83,4 @@ namespace OpenSim.Framework
/// <remarks>Will be Vector3.Zero for a child agent.</remarks> /// <remarks>Will be Vector3.Zero for a child agent.</remarks>
Vector3 Lookat { get; } Vector3 Lookat { get; }
} }
} }

View File

@ -364,7 +364,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
return false; return false;
// npcs dont have baked cache // npcs dont have baked cache
if (((ScenePresence)sp).isNPC) if (((ScenePresence)sp).IsNPC)
return true; return true;
// uploaded baked textures will be in assets local cache // uploaded baked textures will be in assets local cache
@ -507,7 +507,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
{ {
int hits = 0; int hits = 0;
if (((ScenePresence)sp).isNPC) if (((ScenePresence)sp).IsNPC)
return true; return true;
lock (m_setAppearanceLock) lock (m_setAppearanceLock)
@ -701,7 +701,7 @@ namespace OpenSim.Region.CoreModules.Avatar.AvatarFactory
public int RequestRebake(IScenePresence sp, bool missingTexturesOnly) public int RequestRebake(IScenePresence sp, bool missingTexturesOnly)
{ {
if (((ScenePresence)sp).isNPC) if (((ScenePresence)sp).IsNPC)
return 0; return 0;
int texturesRebaked = 0; int texturesRebaked = 0;

View File

@ -165,7 +165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Gods
UUID agentID, UUID sessionID, UUID token, bool godLike) UUID agentID, UUID sessionID, UUID token, bool godLike)
{ {
ScenePresence sp = m_scene.GetScenePresence(agentID); ScenePresence sp = m_scene.GetScenePresence(agentID);
if(sp == null || sp.IsDeleted || sp.isNPC) if(sp == null || sp.IsDeleted || sp.IsNPC)
return; return;
if (sessionID != sp.ControllingClient.SessionId) if (sessionID != sp.ControllingClient.SessionId)

View File

@ -356,7 +356,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
return; return;
ScenePresence p = FindPresence(targetID); ScenePresence p = FindPresence(targetID);
if (p != null && p.isNPC) if (p != null && p.IsNPC)
{ {
remoteClient.SendAvatarClassifiedReply(targetID, classifieds); remoteClient.SendAvatarClassifiedReply(targetID, classifieds);
return; return;
@ -751,7 +751,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
Dictionary<UUID, string> picks = new Dictionary<UUID, string>(); Dictionary<UUID, string> picks = new Dictionary<UUID, string>();
ScenePresence p = FindPresence(targetId); ScenePresence p = FindPresence(targetId);
if (p != null && p.isNPC) if (p != null && p.IsNPC)
{ {
remoteClient.SendAvatarPicksReply(targetId, picks); remoteClient.SendAvatarPicksReply(targetId, picks);
return; return;
@ -1165,7 +1165,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes) public void NotesUpdate(IClientAPI remoteClient, UUID queryTargetID, string queryNotes)
{ {
ScenePresence p = FindPresence(queryTargetID); ScenePresence p = FindPresence(queryTargetID);
if (p != null && p.isNPC) if (p != null && p.IsNPC)
{ {
remoteClient.SendAgentAlertMessage( remoteClient.SendAgentAlertMessage(
"Notes for NPCs not available", false); "Notes for NPCs not available", false);
@ -1329,7 +1329,7 @@ namespace OpenSim.Region.CoreModules.Avatar.UserProfiles
} }
ScenePresence p = FindPresence(avatarID); ScenePresence p = FindPresence(avatarID);
if (p != null && p.isNPC) if (p != null && p.IsNPC)
{ {
remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born, remoteClient.SendAvatarProperties(avatarID, ((INPC)(p.ControllingClient)).profileAbout, ((INPC)(p.ControllingClient)).Born,
Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10, Utils.StringToBytes("Non Player Character (NPC)"), "NPCs have no life", 0x10,

View File

@ -65,7 +65,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.GridUser
public void OnMakeRootAgent(ScenePresence sp) public void OnMakeRootAgent(ScenePresence sp)
{ {
if (sp.isNPC) if (sp.IsNPC)
return; return;
if(sp.gotCrossUpdate) if(sp.gotCrossUpdate)

View File

@ -68,7 +68,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsOut.Presence
public void OnMakeRootAgent(ScenePresence sp) public void OnMakeRootAgent(ScenePresence sp)
{ {
if (sp.isNPC) if (sp.IsNPC)
return; return;
if(sp.gotCrossUpdate) if(sp.gotCrossUpdate)

View File

@ -1285,7 +1285,7 @@ namespace OpenSim.Region.CoreModules.World.Land
UUID parcelID = land.LandData.GlobalID; UUID parcelID = land.LandData.GlobalID;
m_scene.ForEachScenePresence(delegate(ScenePresence avatar) m_scene.ForEachScenePresence(delegate(ScenePresence avatar)
{ {
if (avatar.IsDeleted || avatar.isNPC) if (avatar.IsDeleted || avatar.IsNPC)
return; return;
IClientAPI client = avatar.ControllingClient; IClientAPI client = avatar.ControllingClient;

View File

@ -718,7 +718,7 @@ namespace OpenSim.Region.CoreModules.World.Land
if (!m_scene.TryGetScenePresence(avatar, out sp)) if (!m_scene.TryGetScenePresence(avatar, out sp))
return true; return true;
if(sp==null || !sp.isNPC) if(sp==null || !sp.IsNPC)
return true; return true;
INPC npccli = (INPC)sp.ControllingClient; INPC npccli = (INPC)sp.ControllingClient;

View File

@ -2302,7 +2302,7 @@ namespace OpenSim.Region.Framework.Scenes
List<ScenePresence> sitters = GetSittingAvatars(); List<ScenePresence> sitters = GetSittingAvatars();
foreach(ScenePresence sp in sitters) foreach(ScenePresence sp in sitters)
{ {
if(!sp.IsDeleted && !sp.isNPC && sp.IsSatOnObject) if(!sp.IsDeleted && !sp.IsNPC && sp.IsSatOnObject)
return; return;
} }
} }

View File

@ -2723,7 +2723,7 @@ namespace OpenSim.Region.Framework.Scenes
detobj.posVector = av.AbsolutePosition; detobj.posVector = av.AbsolutePosition;
detobj.rotQuat = av.Rotation; detobj.rotQuat = av.Rotation;
detobj.velVector = av.Velocity; detobj.velVector = av.Velocity;
detobj.colliderType = av.isNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs detobj.colliderType = av.IsNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs
if(av.IsSatOnObject) if(av.IsSatOnObject)
detobj.colliderType |= 0x4; //passive detobj.colliderType |= 0x4; //passive
else if(detobj.velVector != Vector3.Zero) else if(detobj.velVector != Vector3.Zero)

View File

@ -90,7 +90,7 @@ namespace OpenSim.Region.Framework.Scenes
m_scene.EventManager.TriggerScenePresenceUpdated(this); m_scene.EventManager.TriggerScenePresenceUpdated(this);
} }
public bool isNPC { get; private set; } public bool IsNPC { get; private set; }
// simple yes or no isGOD from god level >= 200 // simple yes or no isGOD from god level >= 200
// should only be set by GodController // should only be set by GodController
@ -106,7 +106,7 @@ namespace OpenSim.Region.Framework.Scenes
private set private set
{ {
m_presenceType = value; m_presenceType = value;
isNPC = (m_presenceType == PresenceType.Npc); IsNPC = (m_presenceType == PresenceType.Npc);
} }
} }
@ -1974,7 +1974,7 @@ namespace OpenSim.Region.Framework.Scenes
try try
{ {
// Make sure it's not a login agent. We don't want to wait for updates during login // Make sure it's not a login agent. We don't want to wait for updates during login
if (!isNPC && !IsRealLogin(m_teleportFlags)) if (!IsNPC && !IsRealLogin(m_teleportFlags))
{ {
// Let's wait until UpdateAgent (called by departing region) is done // Let's wait until UpdateAgent (called by departing region) is done
@ -2012,7 +2012,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts)); m_log.DebugFormat("[CompleteMovement] MakeRootAgent: {0}ms", Util.EnvironmentTickCountSubtract(ts));
if(!haveGroupInformation && !IsChildAgent && !isNPC) if(!haveGroupInformation && !IsChildAgent && !IsNPC)
{ {
IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>(); IGroupsModule gm = m_scene.RequestModuleInterface<IGroupsModule>();
if (gm != null) if (gm != null)
@ -2086,7 +2086,7 @@ namespace OpenSim.Region.Framework.Scenes
m_currentParcelHide = false; m_currentParcelHide = false;
m_currentParcelUUID = UUID.Zero; m_currentParcelUUID = UUID.Zero;
if(!isNPC) if(!IsNPC)
{ {
GodController.SyncViewerState(); GodController.SyncViewerState();
@ -2104,7 +2104,7 @@ namespace OpenSim.Region.Framework.Scenes
// verify baked textures and cache // verify baked textures and cache
bool cachedbaked = false; bool cachedbaked = false;
if (isNPC) if (IsNPC)
cachedbaked = true; cachedbaked = true;
else else
{ {
@ -2168,14 +2168,14 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts)); m_log.DebugFormat("[CompleteMovement] ValidateAndSendAppearanceAndAgentData: {0}ms", Util.EnvironmentTickCountSubtract(ts));
// attachments // attachments
if (isNPC || IsRealLogin(m_teleportFlags)) if (IsNPC || IsRealLogin(m_teleportFlags))
{ {
if (Scene.AttachmentsModule != null) if (Scene.AttachmentsModule != null)
// Util.FireAndForget( // Util.FireAndForget(
// o => // o =>
// { // {
if (!isNPC) if (!IsNPC)
Scene.AttachmentsModule.RezAttachments(this); Scene.AttachmentsModule.RezAttachments(this);
else else
Util.FireAndForget(x => Util.FireAndForget(x =>
@ -2235,7 +2235,7 @@ namespace OpenSim.Region.Framework.Scenes
m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts)); m_log.DebugFormat("[CompleteMovement] openChildAgents: {0}ms", Util.EnvironmentTickCountSubtract(ts));
// send the rest of the world // send the rest of the world
if (m_teleportFlags > 0 && !isNPC || m_currentParcelHide) if (m_teleportFlags > 0 && !IsNPC || m_currentParcelHide)
SendInitialDataToMe(); SendInitialDataToMe();
// priority uses avatar position only // priority uses avatar position only
@ -4470,7 +4470,7 @@ namespace OpenSim.Region.Framework.Scenes
/// </summary> /// </summary>
public void GrantGodlikePowers(UUID token, bool godStatus) public void GrantGodlikePowers(UUID token, bool godStatus)
{ {
if (isNPC) if (IsNPC)
return; return;
bool wasgod = isViewerUIGod; bool wasgod = isViewerUIGod;
@ -6194,7 +6194,7 @@ namespace OpenSim.Region.Framework.Scenes
detobj.posVector = av.AbsolutePosition; detobj.posVector = av.AbsolutePosition;
detobj.rotQuat = av.Rotation; detobj.rotQuat = av.Rotation;
detobj.velVector = av.Velocity; detobj.velVector = av.Velocity;
detobj.colliderType = av.isNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs detobj.colliderType = av.IsNPC ? 0x20 : 0x1; // OpenSim\Region\ScriptEngine\Shared\Helpers.cs
if(av.IsSatOnObject) if(av.IsSatOnObject)
detobj.colliderType |= 0x4; //passive detobj.colliderType |= 0x4; //passive
else if(detobj.velVector != Vector3.Zero) else if(detobj.velVector != Vector3.Zero)