diff options
author | John Hurliman | 2009-10-22 14:33:54 -0700 |
---|---|---|
committer | John Hurliman | 2009-10-22 14:33:54 -0700 |
commit | ba2972eaf6d608fe4e6a6610089ab9fb8bae3f2d (patch) | |
tree | fc21babfe36539d4b61c0a4d5154ba0c91866768 /OpenSim | |
parent | Forgot to hit save in the last commit (diff) | |
download | opensim-SC_OLD-ba2972eaf6d608fe4e6a6610089ab9fb8bae3f2d.zip opensim-SC_OLD-ba2972eaf6d608fe4e6a6610089ab9fb8bae3f2d.tar.gz opensim-SC_OLD-ba2972eaf6d608fe4e6a6610089ab9fb8bae3f2d.tar.bz2 opensim-SC_OLD-ba2972eaf6d608fe4e6a6610089ab9fb8bae3f2d.tar.xz |
* 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
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | 31 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 15 |
2 files changed, 23 insertions, 23 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs index a4bcbad..f4b54aa 100644 --- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs +++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs | |||
@@ -58,7 +58,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 58 | LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
59 | 59 | ||
60 | private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg"; | 60 | private static readonly string DEFAULT_WORLD_MAP_EXPORT_PATH = "exportmap.jpg"; |
61 | 61 | private static readonly UUID STOP_UUID = UUID.Random(); | |
62 | private static readonly string m_mapLayerPath = "0001/"; | 62 | private static readonly string m_mapLayerPath = "0001/"; |
63 | 63 | ||
64 | private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); | 64 | private OpenSim.Framework.BlockingQueue<MapRequestState> requests = new OpenSim.Framework.BlockingQueue<MapRequestState>(); |
@@ -349,7 +349,7 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
349 | private void StopThread() | 349 | private void StopThread() |
350 | { | 350 | { |
351 | MapRequestState st = new MapRequestState(); | 351 | MapRequestState st = new MapRequestState(); |
352 | st.agentID=UUID.Zero; | 352 | st.agentID=STOP_UUID; |
353 | st.EstateID=0; | 353 | st.EstateID=0; |
354 | st.flags=0; | 354 | st.flags=0; |
355 | st.godlike=false; | 355 | st.godlike=false; |
@@ -437,25 +437,26 @@ namespace OpenSim.Region.CoreModules.World.WorldMap | |||
437 | { | 437 | { |
438 | while (true) | 438 | while (true) |
439 | { | 439 | { |
440 | MapRequestState st = requests.Dequeue(); | 440 | MapRequestState st = requests.Dequeue(1000); |
441 | 441 | ||
442 | // end gracefully | 442 | // end gracefully |
443 | if (st.agentID == UUID.Zero) | 443 | if (st.agentID == STOP_UUID) |
444 | { | ||
445 | break; | 444 | break; |
446 | } | ||
447 | 445 | ||
448 | bool dorequest = true; | 446 | if (st.agentID != UUID.Zero) |
449 | lock (m_rootAgents) | ||
450 | { | 447 | { |
451 | if (!m_rootAgents.Contains(st.agentID)) | 448 | bool dorequest = true; |
452 | dorequest = false; | 449 | lock (m_rootAgents) |
453 | } | 450 | { |
451 | if (!m_rootAgents.Contains(st.agentID)) | ||
452 | dorequest = false; | ||
453 | } | ||
454 | 454 | ||
455 | if (dorequest) | 455 | if (dorequest) |
456 | { | 456 | { |
457 | OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); | 457 | OSDMap response = RequestMapItemsAsync("", st.agentID, st.flags, st.EstateID, st.godlike, st.itemtype, st.regionhandle); |
458 | RequestMapItemsCompleted(response); | 458 | RequestMapItemsCompleted(response); |
459 | } | ||
459 | } | 460 | } |
460 | 461 | ||
461 | Watchdog.UpdateThread(); | 462 | Watchdog.UpdateThread(); |
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index cfd3fcc..ccfffe7 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -2417,7 +2417,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2417 | pos.Z -= m_appearance.HipOffset; | 2417 | pos.Z -= m_appearance.HipOffset; |
2418 | 2418 | ||
2419 | remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, | 2419 | remoteClient.SendAvatarTerseUpdate(new SendAvatarTerseData(m_regionHandle, (ushort)(m_scene.TimeDilation * ushort.MaxValue), LocalId, |
2420 | pos, m_velocity, Vector3.Zero, m_rotation, Vector4.Zero, m_uuid, null, GetUpdatePriority(remoteClient))); | 2420 | pos, m_velocity, Vector3.Zero, m_bodyRot, Vector4.UnitW, m_uuid, null, GetUpdatePriority(remoteClient))); |
2421 | 2421 | ||
2422 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); | 2422 | m_scene.StatsReporter.AddAgentTime(Environment.TickCount - m_perfMonMS); |
2423 | m_scene.StatsReporter.AddAgentUpdates(1); | 2423 | m_scene.StatsReporter.AddAgentUpdates(1); |
@@ -2522,7 +2522,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
2522 | 2522 | ||
2523 | remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, | 2523 | remoteAvatar.m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, |
2524 | LocalId, pos, m_appearance.Texture.GetBytes(), | 2524 | LocalId, pos, m_appearance.Texture.GetBytes(), |
2525 | m_parentID, m_rotation)); | 2525 | m_parentID, m_bodyRot)); |
2526 | m_scene.StatsReporter.AddAgentUpdates(1); | 2526 | m_scene.StatsReporter.AddAgentUpdates(1); |
2527 | } | 2527 | } |
2528 | 2528 | ||
@@ -2585,14 +2585,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2585 | // the inventory arrives | 2585 | // the inventory arrives |
2586 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); | 2586 | // m_scene.GetAvatarAppearance(m_controllingClient, out m_appearance); |
2587 | 2587 | ||
2588 | // Note: because Quaternion is a struct, it can't be null | ||
2589 | Quaternion rot = m_bodyRot; | ||
2590 | |||
2591 | Vector3 pos = m_pos; | 2588 | Vector3 pos = m_pos; |
2592 | pos.Z -= m_appearance.HipOffset; | 2589 | pos.Z -= m_appearance.HipOffset; |
2593 | 2590 | ||
2594 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2591 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, |
2595 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); | 2592 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); |
2596 | 2593 | ||
2597 | if (!m_isChildAgent) | 2594 | if (!m_isChildAgent) |
2598 | { | 2595 | { |
@@ -2697,9 +2694,11 @@ namespace OpenSim.Region.Framework.Scenes | |||
2697 | m_startAnimationSet = true; | 2694 | m_startAnimationSet = true; |
2698 | } | 2695 | } |
2699 | 2696 | ||
2700 | Quaternion rot = m_bodyRot; | 2697 | Vector3 pos = m_pos; |
2698 | pos.Z -= m_appearance.HipOffset; | ||
2699 | |||
2701 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, | 2700 | m_controllingClient.SendAvatarData(new SendAvatarData(m_regionInfo.RegionHandle, m_firstname, m_lastname, m_grouptitle, m_uuid, LocalId, |
2702 | m_pos, m_appearance.Texture.GetBytes(), m_parentID, rot)); | 2701 | pos, m_appearance.Texture.GetBytes(), m_parentID, m_bodyRot)); |
2703 | 2702 | ||
2704 | } | 2703 | } |
2705 | 2704 | ||