Make object chat come from the root prim's center, rather than trying to make

it come from a child prim position.
0.6.1-post-fixes
Melanie Thielker 2008-11-17 05:57:58 +00:00
parent 2a8020b9d9
commit 598316c890
2 changed files with 9 additions and 12 deletions

View File

@ -424,17 +424,14 @@ namespace OpenSim.Region.Environment.Scenes
m_groupPosition.Y = PhysActor.Position.Y;
m_groupPosition.Z = PhysActor.Position.Z;
}
if (IsAttachment)
{
// if (m_parentGroup != null && m_parentGroup.RootPart != null)
// {
// ScenePresence sp = m_parentGroup.Scene.GetScenePresence(m_parentGroup.RootPart.AttachedAvatar);
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar);
if (sp != null)
{
return sp.AbsolutePosition;
}
// }
ScenePresence sp = m_parentGroup.Scene.GetScenePresence(AttachedAvatar);
if (sp != null)
{
return sp.AbsolutePosition;
}
}
return m_groupPosition;

View File

@ -672,7 +672,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
text = text.Substring(0, 1023);
World.SimChat(Utils.StringToBytes(text),
ChatTypeEnum.Whisper, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
ChatTypeEnum.Whisper, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
wComm.DeliverMessage(ChatTypeEnum.Whisper, channelID, m_host.Name, m_host.UUID, text);
@ -686,7 +686,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
text = text.Substring(0, 1023);
World.SimChat(Utils.StringToBytes(text),
ChatTypeEnum.Say, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, false);
ChatTypeEnum.Say, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, false);
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
wComm.DeliverMessage(ChatTypeEnum.Say, channelID, m_host.Name, m_host.UUID, text);
@ -700,7 +700,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api
text = text.Substring(0, 1023);
World.SimChat(Utils.StringToBytes(text),
ChatTypeEnum.Shout, channelID, m_host.AbsolutePosition, m_host.Name, m_host.UUID, true);
ChatTypeEnum.Shout, channelID, m_host.ParentGroup.RootPart.AbsolutePosition, m_host.Name, m_host.UUID, true);
IWorldComm wComm = m_ScriptEngine.World.RequestModuleInterface<IWorldComm>();
wComm.DeliverMessage(ChatTypeEnum.Shout, channelID, m_host.Name, m_host.UUID, text);