a few changes cosmetic changes around OSChatMessage...

This commit is contained in:
UbitUmarov
2022-06-20 06:49:43 +01:00
parent 9af568307e
commit 0d594e4c42
9 changed files with 72 additions and 153 deletions

View File

@@ -224,7 +224,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
switch (sourceType)
{
case ChatSourceType.Agent:
ScenePresence avatar = (scene as Scene).GetScenePresence(c.Sender.AgentId);
ScenePresence avatar = scene.GetScenePresence(c.Sender.AgentId);
if(avatar == null)
return;
fromPos = avatar.AbsolutePosition;
@@ -355,7 +355,7 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
ownerID = c.Sender.AgentId;
sourceType = ChatSourceType.Agent;
}
else if (!c.SenderUUID.IsZero())
else if (c.SenderUUID.IsNotZero())
{
if(c.SenderObject == null)
return;
@@ -444,7 +444,6 @@ namespace OpenSim.Region.CoreModules.Avatar.Chat
}
}
// TODO: should change so the message is sent through the avatar rather than direct to the ClientView
presence.ControllingClient.SendChatMessage(
message, (byte) type, fromPos, fromName,
fromAgentID, ownerID, (byte)src, (byte)ChatAudibleLevel.Fully);