diff options
author | UbitUmarov | 2012-02-15 19:44:54 +0000 |
---|---|---|
committer | UbitUmarov | 2012-02-15 19:44:54 +0000 |
commit | b59275355e9dd8fbc126faf5bded8e61e84df4e8 (patch) | |
tree | 7f56dae8a792710ad4cab21cd7d8a79d3e2bc36b /OpenSim/Region | |
parent | try to make crossings work better. chode no longer prevents crossings i hope (diff) | |
download | opensim-SC-b59275355e9dd8fbc126faf5bded8e61e84df4e8.zip opensim-SC-b59275355e9dd8fbc126faf5bded8e61e84df4e8.tar.gz opensim-SC-b59275355e9dd8fbc126faf5bded8e61e84df4e8.tar.bz2 opensim-SC-b59275355e9dd8fbc126faf5bded8e61e84df4e8.tar.xz |
don't freeze with a sitted avatar in a border without other sim. Still messy :(
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | 9 | ||||
-rw-r--r-- | OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs index 77e67ba..53edcd6 100644 --- a/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs +++ b/OpenSim/Region/Framework/Scenes/SceneObjectGroup.cs | |||
@@ -537,8 +537,15 @@ namespace OpenSim.Region.Framework.Scenes | |||
537 | return; | 537 | return; |
538 | } | 538 | } |
539 | } | 539 | } |
540 | else if (RootPart.PhysActor != null) | ||
541 | { | ||
542 | RootPart.PhysActor.CrossingFailure(); | ||
543 | } | ||
540 | 544 | ||
541 | val = AbsolutePosition; | 545 | Vector3 oldp = AbsolutePosition; |
546 | val.X = Util.Clamp<float>(oldp.X, 0.5f, (float)Constants.RegionSize - 0.5f); | ||
547 | val.Y = Util.Clamp<float>(oldp.Y, 0.5f, (float)Constants.RegionSize - 0.5f); | ||
548 | val.Z = Util.Clamp<float>(oldp.Z, 0.5f, 4096.0f); | ||
542 | } | 549 | } |
543 | } | 550 | } |
544 | 551 | ||
diff --git a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs index 95a9741..073241f 100644 --- a/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/ChOdePlugin/ODEPrim.cs | |||
@@ -3125,7 +3125,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!"); | |||
3125 | d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); | 3125 | d.BodySetPosition(Body, _position.X, _position.Y, _position.Z); |
3126 | d.BodySetLinearVel(Body, 0, 0, 0); | 3126 | d.BodySetLinearVel(Body, 0, 0, 0); |
3127 | 3127 | ||
3128 | if (Interlocked.Exchange(ref m_crossingfailures, 0) == 0) | 3128 | if (Interlocked.Exchange(ref m_crossingfailures, m_crossingfailures) == 0) |
3129 | { // tell base code only once | 3129 | { // tell base code only once |
3130 | Interlocked.Increment(ref m_crossingfailures); | 3130 | Interlocked.Increment(ref m_crossingfailures); |
3131 | base.RequestPhysicsterseUpdate(); | 3131 | base.RequestPhysicsterseUpdate(); |
@@ -3133,7 +3133,7 @@ Console.WriteLine("ODEPrim JointCreateFixed !!!"); | |||
3133 | return; | 3133 | return; |
3134 | } | 3134 | } |
3135 | 3135 | ||
3136 | if (Interlocked.Exchange(ref m_crossingfailures, 0) > 1) | 3136 | if (Interlocked.Exchange(ref m_crossingfailures, 0) != 0) |
3137 | { | 3137 | { |
3138 | // main simulator had a crossing failure | 3138 | // main simulator had a crossing failure |
3139 | // park it inside region | 3139 | // park it inside region |