aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/ScenePresence.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/ScenePresence.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/ScenePresence.cs18
1 files changed, 16 insertions, 2 deletions
diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
index 5403fc7..61fce39 100644
--- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs
+++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs
@@ -100,6 +100,9 @@ namespace OpenSim.Region.Environment.Scenes
100 private LLQuaternion m_headrotation = new LLQuaternion(); 100 private LLQuaternion m_headrotation = new LLQuaternion();
101 private byte m_state = (byte) 0; 101 private byte m_state = (byte) 0;
102 102
103 //Reuse the LLVector3 instead of creating a new one on the UpdateMovement method
104 private LLVector3 movementvector = new LLVector3();
105
103 private List<LLUUID> m_knownPrimUUID = new List<LLUUID>(); 106 private List<LLUUID> m_knownPrimUUID = new List<LLUUID>();
104 107
105 // Agent's Draw distance. 108 // Agent's Draw distance.
@@ -1660,8 +1663,19 @@ namespace OpenSim.Region.Environment.Scenes
1660 NewForce force = m_forcesList[i]; 1663 NewForce force = m_forcesList[i];
1661 1664
1662 m_updateflag = true; 1665 m_updateflag = true;
1663 1666 try
1664 Velocity = new LLVector3(force.X, force.Y, force.Z); 1667 {
1668 movementvector.X = force.X;
1669 movementvector.Y = force.Y;
1670 movementvector.Z = force.Z;
1671 Velocity = movementvector;
1672 }
1673 catch (System.NullReferenceException)
1674 {
1675 // Under extreme load, this returns a NullReference Exception that we can ignore.
1676 // Ignoring this causes no movement to be sent to the physics engine...
1677 // which when the scene is moving at 1 frame every 10 seconds, it doesn't really matter!
1678 }
1665 m_newForce = true; 1679 m_newForce = true;
1666 } 1680 }
1667 for (int i = 0; i < m_forcesList.Count; i++) 1681 for (int i = 0; i < m_forcesList.Count; i++)