From aab38c2cb2a00f89b6fd796b5e1d58a8ee1a4305 Mon Sep 17 00:00:00 2001 From: idb Date: Fri, 20 Mar 2009 15:59:11 +0000 Subject: Ensure the remembered velocity is zero when physical is turned off on a prim. Without this the velocity gets sent to the client and the prim appears to move. Fixes Mantis #3303 --- OpenSim/Region/Physics/OdePlugin/ODEPrim.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Physics') diff --git a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs index 2046ff9..e42c711 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEPrim.cs @@ -2264,7 +2264,11 @@ namespace OpenSim.Region.Physics.OdePlugin public override bool IsPhysical { get { return m_isphysical; } - set { m_isphysical = value; } + set { + m_isphysical = value; + if (!m_isphysical) // Zero the remembered last velocity + m_lastVelocity = new PhysicsVector(0.0f, 0.0f, 0.0f); + } } public void setPrimForRemoval() -- cgit v1.1