diff options
author | Teravus Ovares | 2008-02-23 12:46:23 +0000 |
---|---|---|
committer | Teravus Ovares | 2008-02-23 12:46:23 +0000 |
commit | bbb8b66908a72632324c0b2aefbe2ce5e2c710c2 (patch) | |
tree | 94889fadeaf10fcc16a3c73a6086ed586e185be7 /OpenSim/Region/Physics | |
parent | * One more fix to the selected feature (diff) | |
download | opensim-SC_OLD-bbb8b66908a72632324c0b2aefbe2ce5e2c710c2.zip opensim-SC_OLD-bbb8b66908a72632324c0b2aefbe2ce5e2c710c2.tar.gz opensim-SC_OLD-bbb8b66908a72632324c0b2aefbe2ce5e2c710c2.tar.bz2 opensim-SC_OLD-bbb8b66908a72632324c0b2aefbe2ce5e2c710c2.tar.xz |
* Made Physics updates a teensy bit more responsive. A previous CPU optimization of mine slowed the speed of updates using the 'poll' method in certain circumstances.
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 50df745..05dcd7a 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | |||
@@ -1447,9 +1447,10 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1447 | } | 1447 | } |
1448 | } | 1448 | } |
1449 | public void UpdatePositionAndVelocity() | 1449 | public void UpdatePositionAndVelocity() |
1450 | { | 1450 | { |
1451 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! | 1451 | // no lock; called from Simulate() -- if you call this from elsewhere, gotta lock or do Monitor.Enter/Exit! |
1452 | PhysicsVector pv = new PhysicsVector(0, 0, 0); | 1452 | PhysicsVector pv = new PhysicsVector(0, 0, 0); |
1453 | bool lastZeroFlag = _zeroFlag; | ||
1453 | if (Body != (IntPtr) 0) | 1454 | if (Body != (IntPtr) 0) |
1454 | { | 1455 | { |
1455 | d.Vector3 vec = d.BodyGetPosition(Body); | 1456 | d.Vector3 vec = d.BodyGetPosition(Body); |
@@ -1546,6 +1547,9 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
1546 | } | 1547 | } |
1547 | else | 1548 | else |
1548 | { | 1549 | { |
1550 | if (lastZeroFlag != _zeroFlag) | ||
1551 | base.RequestPhysicsterseUpdate(); | ||
1552 | |||
1549 | m_lastVelocity = _velocity; | 1553 | m_lastVelocity = _velocity; |
1550 | 1554 | ||
1551 | _position = l_position; | 1555 | _position = l_position; |