mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 17:05:55 +08:00
== UUID.Zero is slow
This commit is contained in:
@@ -283,7 +283,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
if (checkParcelHide)
|
||||
{
|
||||
checkParcelHide = false;
|
||||
if (c.Type < ChatTypeEnum.DebugChannel && destination == UUID.Zero)
|
||||
if (c.Type < ChatTypeEnum.DebugChannel && destination.IsZero())
|
||||
{
|
||||
ILandObject srcland = scene.LandChannel.GetLandObject(hidePos.X, hidePos.Y);
|
||||
if (srcland != null && !srcland.LandData.SeeAVs)
|
||||
@@ -298,7 +298,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
scene.ForEachScenePresence(
|
||||
delegate(ScenePresence presence)
|
||||
{
|
||||
if (destination != UUID.Zero && presence.UUID != destination)
|
||||
if (!destination.IsZero() && presence.UUID.NotEqual(destination))
|
||||
return;
|
||||
|
||||
if(presence.IsChildAgent)
|
||||
@@ -307,7 +307,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
return;
|
||||
if (TrySendChatMessage(presence, fromPos, regionPos, fromID,
|
||||
ownerID, fromNamePrefix + fromName, c.Type,
|
||||
message, sourceType, (destination != UUID.Zero)))
|
||||
message, sourceType, !destination.IsZero()))
|
||||
receiverIDs.Add(presence.UUID);
|
||||
return;
|
||||
}
|
||||
@@ -317,14 +317,14 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
{
|
||||
if (checkParcelHide)
|
||||
{
|
||||
if (sourceParcelID != Presencecheck.LandData.GlobalID && !presence.IsViewerUIGod)
|
||||
if (sourceParcelID.NotEqual(Presencecheck.LandData.GlobalID) && !presence.IsViewerUIGod)
|
||||
return;
|
||||
}
|
||||
if (c.Sender == null || Presencecheck.IsEitherBannedOrRestricted(c.Sender.AgentId) != true)
|
||||
{
|
||||
if (TrySendChatMessage(presence, fromPos, regionPos, fromID,
|
||||
ownerID, fromNamePrefix + fromName, c.Type,
|
||||
message, sourceType, (destination != UUID.Zero)))
|
||||
message, sourceType, !destination.IsZero()))
|
||||
receiverIDs.Add(presence.UUID);
|
||||
}
|
||||
}
|
||||
@@ -365,7 +365,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
ownerID = c.Sender.AgentId;
|
||||
sourceType = ChatSourceType.Agent;
|
||||
}
|
||||
else if (c.SenderUUID != UUID.Zero)
|
||||
else if (!c.SenderUUID.IsZero())
|
||||
{
|
||||
if(c.SenderObject == null)
|
||||
return;
|
||||
@@ -386,7 +386,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
|
||||
// non-owner agents
|
||||
if ((c.Type == ChatTypeEnum.Owner) &&
|
||||
(null != c.SenderObject) &&
|
||||
(((SceneObjectPart)c.SenderObject).OwnerID != client.AgentId))
|
||||
(((SceneObjectPart)c.SenderObject).OwnerID.NotEqual(client.AgentId)))
|
||||
return;
|
||||
|
||||
client.SendChatMessage(c.Message, (byte)cType, CenterOfRegion, fromName, fromID, fromID,
|
||||
|
||||
Reference in New Issue
Block a user