* Send out m_bodyRot everywhere instead of m_rotation. Still have no clue which is right

* Fix WorldMapModule.process() to not trip the watchdog timer
0.6.8-post-fixes
John Hurliman 2009-10-22 14:33:54 -07:00
parent 4ba3842d71
commit ba2972eaf6
2 changed files with 23 additions and 23 deletions

View File

@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg"; private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg";
private static readonly UUID STOP_UUID = UUID.Random();
private static readonly string m_mapLayerPath = "0001/"; private static readonly string m_mapLayerPath = "0001/";
private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>();
@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
private void StopThread() private void StopThread()
{ {
MapRequestState st = new MapRequestState(); MapRequestState st = new MapRequestState();
st.agentID=UUID.Zero; st.agentID=STOP_UUID;
st.EstateID=0; st.EstateID=0;
st.flags=0; st.flags=0;
st.godlike=false; st.godlike=false;
@ -437,14 +437,14 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
{ {
while (true) while (true)
{ {
MapRequestState st = requests.Dequeue(); MapRequestState st = requests.Dequeue(1000);
// end gracefully // end gracefully
if (st.agentID == UUID.Zero) if (st.agentID == STOP_UUID)
{
break; break;
}
if (st.agentID != UUID.Zero)
{
bool dorequest = true; bool dorequest = true;
lock (m_rootAgents) lock (m_rootAgents)
{ {
@ -457,6 +457,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle);
RequestMapItemsCompleted(response); RequestMapItemsCompleted(response);
} }
}
Watchdog.UpdateThread(); Watchdog.UpdateThread();
} }

View File

@ -2417,7 +2417,7 @@ namespace OpenSim.Region.Framework.Scenes
pos.Z -= m_appearance.HipOffset; pos.Z -= m_appearance.HipOffset;
remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId,
pos, m_velocity, Vector3.Zero, m_rotation, Vector4.Zero, m_uuid, null, GetUpdatePriority(remoteClient))); pos, m_velocity, Vector3.Zero, m_bodyRot, Vector4.UnitW, m_uuid, null, GetUpdatePriority(remoteClient)));
m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS);
m_scene.StatsReporter.AddAgentUpdates(1); m_scene.StatsReporter.AddAgentUpdates(1);
@ -2522,7 +2522,7 @@ namespace OpenSim.Region.Framework.Scenes
remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid,
LocalId, pos, m_appearance.Texture.GetBytes(), LocalId, pos, m_appearance.Texture.GetBytes(),
m_parentID, m_rotation)); m_parentID, m_bodyRot));
m_scene.StatsReporter.AddAgentUpdates(1); m_scene.StatsReporter.AddAgentUpdates(1);
} }
@ -2585,14 +2585,11 @@ namespace OpenSim.Region.Framework.Scenes
// the inventory arrives // the inventory arrives
// m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance);
// Note: because Quaternion is a struct, it can't be null
Quaternion rot = m_bodyRot;
Vector3 pos = m_pos; Vector3 pos = m_pos;
pos.Z -= m_appearance.HipOffset; pos.Z -= m_appearance.HipOffset;
m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot));
if (!m_isChildAgent) if (!m_isChildAgent)
{ {
@ -2697,9 +2694,11 @@ namespace OpenSim.Region.Framework.Scenes
m_startAnimationSet = true; m_startAnimationSet = true;
} }
Quaternion rot = m_bodyRot; Vector3 pos = m_pos;
pos.Z -= m_appearance.HipOffset;
m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId,
m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot));
} }