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/ScenePresence.cs | |
parent | Update svn properties. Formatting cleanup. (diff) | |
download | opensim-SC-334d05db05772c61d8ebb9f697ee4219965943f1.zip opensim-SC-334d05db05772c61d8ebb9f697ee4219965943f1.tar.gz opensim-SC-334d05db05772c61d8ebb9f697ee4219965943f1.tar.bz2 opensim-SC-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/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 37 |
1 files changed, 37 insertions, 0 deletions
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 | ||