diff options
author | Teravus Ovares | 2008-05-30 11:25:21 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-05-30 11:25:21 +0000 |
commit | 334d05db05772c61d8ebb9f697ee4219965943f1 (patch) | |
tree | 3e99f1d8f01cbce32846e686fb75a33ebfaa022a /OpenSim/Region/Environment/Scenes | |
parent | Update svn properties. Formatting cleanup. (diff) | |
download | opensim-SC_OLD-334d05db05772c61d8ebb9f697ee4219965943f1.zip opensim-SC_OLD-334d05db05772c61d8ebb9f697ee4219965943f1.tar.gz opensim-SC_OLD-334d05db05772c61d8ebb9f697ee4219965943f1.tar.bz2 opensim-SC_OLD-334d05db05772c61d8ebb9f697ee4219965943f1.tar.xz |
* Fixed a dangling event hook that I added.
* Added a Non-finite avatar position reset. This will either handle the <0,0,0> avatar gracefully, or send the avatar to 127,127,127 if that also doesn't work. ( I've only been able to reproduce this error once on my development workstation )
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/EventManager.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 37 |
2 files changed, 49 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Scenes/EventManager.cs b/OpenSim/Region/Environment/Scenes/EventManager.cs index e77bebc..c7d21c8 100644 --- a/OpenSim/Region/Environment/Scenes/EventManager.cs +++ b/OpenSim/Region/Environment/Scenes/EventManager.cs | |||
@@ -180,6 +180,8 @@ namespace OpenSim.Region.Environment.Scenes | |||
180 | 180 | ||
181 | public event ScriptTimerEvent OnScriptTimerEvent; | 181 | public event ScriptTimerEvent OnScriptTimerEvent; |
182 | 182 | ||
183 | public delegate void EstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool EstateSun, float LindenHour); | ||
184 | public event EstateToolsTimeUpdate OnEstateToolsTimeUpdate; | ||
183 | 185 | ||
184 | public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); | 186 | public delegate void ObjectBeingRemovedFromScene(SceneObjectGroup obj); |
185 | public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; | 187 | public event ObjectBeingRemovedFromScene OnObjectBeingRemovedFromScene; |
@@ -346,6 +348,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
346 | private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; | 348 | private ParcelPrimCountTainted handlerParcelPrimCountTainted = null; |
347 | private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; | 349 | private ObjectBeingRemovedFromScene handlerObjectBeingRemovedFromScene = null; |
348 | private ScriptTimerEvent handlerScriptTimerEvent = null; | 350 | private ScriptTimerEvent handlerScriptTimerEvent = null; |
351 | private EstateToolsTimeUpdate handlerEstateToolsTimeUpdate = null; | ||
349 | 352 | ||
350 | public void TriggerOnScriptChangedEvent(uint localID, uint change) | 353 | public void TriggerOnScriptChangedEvent(uint localID, uint change) |
351 | { | 354 | { |
@@ -798,5 +801,14 @@ namespace OpenSim.Region.Environment.Scenes | |||
798 | } | 801 | } |
799 | 802 | ||
800 | } | 803 | } |
804 | |||
805 | public void TriggerEstateToolsTimeUpdate(ulong regionHandle, bool FixedTime, bool useEstateTime, float LindenHour) | ||
806 | { | ||
807 | handlerEstateToolsTimeUpdate = OnEstateToolsTimeUpdate; | ||
808 | if (handlerEstateToolsTimeUpdate != null) | ||
809 | { | ||
810 | handlerEstateToolsTimeUpdate(regionHandle, FixedTime, useEstateTime, LindenHour); | ||
811 | } | ||
812 | } | ||
801 | } | 813 | } |
802 | } | 814 | } |
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index 96adbe7..30075da 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs | |||
@@ -90,6 +90,9 @@ namespace OpenSim.Region.Environment.Scenes | |||
90 | private short m_updateCount = 0; | 90 | private short m_updateCount = 0; |
91 | private uint m_requestedSitTargetID = 0; | 91 | private uint m_requestedSitTargetID = 0; |
92 | private LLVector3 m_requestedSitOffset = new LLVector3(); | 92 | private LLVector3 m_requestedSitOffset = new LLVector3(); |
93 | |||
94 | private LLVector3 m_LastFinitePos = new LLVector3(); | ||
95 | |||
93 | private float m_sitAvatarHeight = 2.0f; | 96 | private float m_sitAvatarHeight = 2.0f; |
94 | private float m_godlevel = 0; | 97 | private float m_godlevel = 0; |
95 | 98 | ||
@@ -750,6 +753,40 @@ namespace OpenSim.Region.Environment.Scenes | |||
750 | 753 | ||
751 | // Must check for standing up even when PhysicsActor is null, | 754 | // Must check for standing up even when PhysicsActor is null, |
752 | // since sitting currently removes avatar from physical scene | 755 | // since sitting currently removes avatar from physical scene |
756 | //m_log.Debug("agentPos:" + AbsolutePosition.ToString()); | ||
757 | |||
758 | // This is irritating. Really. | ||
759 | if (!AbsolutePosition.IsFinite()) | ||
760 | { | ||
761 | RemoveFromPhysicalScene(); | ||
762 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error# 9999902"); | ||
763 | |||
764 | m_pos = m_LastFinitePos; | ||
765 | if (!m_pos.IsFinite()) | ||
766 | { | ||
767 | m_pos.X = 127f; | ||
768 | m_pos.Y = 127f; | ||
769 | m_pos.Z = 127f; | ||
770 | m_log.Error("[AVATAR]: NonFinite Avatar position detected... Reset Position. Mantis this please. Error# 9999903"); | ||
771 | } | ||
772 | |||
773 | AddToPhysicalScene(); | ||
774 | } | ||
775 | else | ||
776 | { | ||
777 | m_LastFinitePos = m_pos; | ||
778 | } | ||
779 | //m_physicsActor.AddForce(new PhysicsVector(999999999, 99999999, 999999999999999), true); | ||
780 | |||
781 | |||
782 | //ILandObject land = LandChannel.GetLandObject(agent.startpos.X, agent.startpos.Y); | ||
783 | //if (land != null) | ||
784 | //{ | ||
785 | //if (land.landData.landingType == (byte)1 && land.landData.userLocation != LLVector3.Zero) | ||
786 | //{ | ||
787 | // agent.startpos = land.landData.userLocation; | ||
788 | //} | ||
789 | //} | ||
753 | 790 | ||
754 | m_perfMonMS = System.Environment.TickCount; | 791 | m_perfMonMS = System.Environment.TickCount; |
755 | 792 | ||