diff options
author | Teravus Ovares | 2009-04-14 01:57:35 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-04-14 01:57:35 +0000 |
commit | c2e75aecd1eba90d3a376896f1a798a4c9c58e6d (patch) | |
tree | 277760c63ec2af87374d62e2c3fd78a081e4be7a /OpenSim/Region/Framework/Scenes/ScenePresence.cs | |
parent | * Set eol-style: native on J2KImage.cs (diff) | |
download | opensim-SC-c2e75aecd1eba90d3a376896f1a798a4c9c58e6d.zip opensim-SC-c2e75aecd1eba90d3a376896f1a798a4c9c58e6d.tar.gz opensim-SC-c2e75aecd1eba90d3a376896f1a798a4c9c58e6d.tar.bz2 opensim-SC-c2e75aecd1eba90d3a376896f1a798a4c9c58e6d.tar.xz |
* Commit a variety of fixes to bugs discovered while trying to fix the NaN singularity.
* WebStatsModule doesn't crash on restart. GodsModule doesn't crash when there is no Dialog Module. LLUDPServer doesn't crash when the Operation was Aborted.
* ODEPlugin does 'Almost NaN' sanity checks.
* ODEPlugin sacrifices NaN avatars to the NaN black hole to appease it and keep it from sucking the rest of the world in.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/ScenePresence.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/ScenePresence.cs | 52 |
1 files changed, 30 insertions, 22 deletions
diff --git a/OpenSim/Region/Framework/Scenes/ScenePresence.cs b/OpenSim/Region/Framework/Scenes/ScenePresence.cs index e5ddeb5..cda90d6 100644 --- a/OpenSim/Region/Framework/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Framework/Scenes/ScenePresence.cs | |||
@@ -939,11 +939,14 @@ namespace OpenSim.Region.Framework.Scenes | |||
939 | { | 939 | { |
940 | if (PhysicsActor != null) | 940 | if (PhysicsActor != null) |
941 | { | 941 | { |
942 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); | 942 | lock (m_scene.SyncRoot) |
943 | m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; | 943 | { |
944 | m_physicsActor.UnSubscribeEvents(); | 944 | m_physicsActor.OnRequestTerseUpdate -= SendTerseUpdateToAllClients; |
945 | m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; | 945 | m_scene.PhysicsScene.RemoveAvatar(PhysicsActor); |
946 | PhysicsActor = null; | 946 | m_physicsActor.UnSubscribeEvents(); |
947 | m_physicsActor.OnCollisionUpdate -= PhysicsCollisionUpdate; | ||
948 | PhysicsActor = null; | ||
949 | } | ||
947 | } | 950 | } |
948 | } | 951 | } |
949 | 952 | ||
@@ -3192,25 +3195,30 @@ namespace OpenSim.Region.Framework.Scenes | |||
3192 | /// </summary> | 3195 | /// </summary> |
3193 | public void AddToPhysicalScene(bool isFlying) | 3196 | public void AddToPhysicalScene(bool isFlying) |
3194 | { | 3197 | { |
3195 | PhysicsScene scene = m_scene.PhysicsScene; | 3198 | lock (m_scene.SyncRoot) |
3196 | |||
3197 | PhysicsVector pVec = | ||
3198 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, | ||
3199 | AbsolutePosition.Z); | ||
3200 | |||
3201 | if (m_avHeight == 127.0f) | ||
3202 | { | ||
3203 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, 1.56f), isFlying); | ||
3204 | } | ||
3205 | else | ||
3206 | { | 3199 | { |
3207 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, m_avHeight), isFlying); | 3200 | PhysicsScene scene = m_scene.PhysicsScene; |
3201 | |||
3202 | PhysicsVector pVec = | ||
3203 | new PhysicsVector(AbsolutePosition.X, AbsolutePosition.Y, | ||
3204 | AbsolutePosition.Z); | ||
3205 | |||
3206 | if (m_avHeight == 127.0f) | ||
3207 | { | ||
3208 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, new PhysicsVector(0, 0, 1.56f), | ||
3209 | isFlying); | ||
3210 | } | ||
3211 | else | ||
3212 | { | ||
3213 | m_physicsActor = scene.AddAvatar(Firstname + "." + Lastname, pVec, | ||
3214 | new PhysicsVector(0, 0, m_avHeight), isFlying); | ||
3215 | } | ||
3216 | scene.AddPhysicsActorTaint(m_physicsActor); | ||
3217 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | ||
3218 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | ||
3219 | m_physicsActor.SubscribeEvents(1000); | ||
3220 | m_physicsActor.LocalID = LocalId; | ||
3208 | } | 3221 | } |
3209 | scene.AddPhysicsActorTaint(m_physicsActor); | ||
3210 | //m_physicsActor.OnRequestTerseUpdate += SendTerseUpdateToAllClients; | ||
3211 | m_physicsActor.OnCollisionUpdate += PhysicsCollisionUpdate; | ||
3212 | m_physicsActor.SubscribeEvents(1000); | ||
3213 | m_physicsActor.LocalID = LocalId; | ||
3214 | } | 3222 | } |
3215 | 3223 | ||
3216 | // Event called by the physics plugin to tell the avatar about a collision. | 3224 | // Event called by the physics plugin to tell the avatar about a collision. |