diff options
Diffstat (limited to 'OpenSim/Region/Environment/Scenes')
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 2 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/ScenePresence.cs | 18 |
2 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index c41979c..dbb4be0 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -737,7 +737,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
737 | m_statsReporter.addOtherMS(otherMS); | 737 | m_statsReporter.addOtherMS(otherMS); |
738 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); | 738 | m_statsReporter.SetActiveScripts(m_innerScene.GetActiveScripts()); |
739 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); | 739 | m_statsReporter.addScriptLines(m_innerScene.GetScriptLPS()); |
740 | 740 | m_log.Warn(physicsMS); | |
741 | } | 741 | } |
742 | catch (NotImplementedException) | 742 | catch (NotImplementedException) |
743 | { | 743 | { |
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++) |