From e5ede36f0c8974dc81d1755d16513641aff535c2 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Tue, 12 Feb 2008 07:32:32 +0000 Subject: * Physical prim cross borders and continue from where the left off on the other side now, assuming the region on the other side has physical prim enabled. --- .../Region/Environment/Scenes/SceneObjectPart.cs | 25 +++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Scenes/SceneObjectPart.cs') diff --git a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs index 7900900..4f5eefe 100644 --- a/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs +++ b/OpenSim/Region/Environment/Scenes/SceneObjectPart.cs @@ -405,7 +405,19 @@ namespace OpenSim.Region.Environment.Scenes return m_velocity; } - set { m_velocity = value; } + set { + + m_velocity = value; + if (PhysActor != null) + { + if (PhysActor.IsPhysical) + { + PhysActor.Velocity = new PhysicsVector(value.X, value.Y, value.Z); + m_parentGroup.Scene.PhysicsScene.AddPhysicsActorTaint(PhysActor); + } + } + + } } public LLVector3 RotationalVelocity @@ -742,6 +754,7 @@ namespace OpenSim.Region.Environment.Scenes { XmlSerializer serializer = new XmlSerializer(typeof (SceneObjectPart)); SceneObjectPart newobject = (SceneObjectPart) serializer.Deserialize(xmlReader); + return newobject; } @@ -1776,6 +1789,16 @@ namespace OpenSim.Region.Environment.Scenes public void PhysicsRequestingTerseUpdate() { + if (PhysActor != null) + { + LLVector3 newpos = new LLVector3(PhysActor.Position.GetBytes(), 0); + if (newpos.X > 257f || newpos.X < -1f || newpos.Y > 257f || newpos.Y < -1f) + { + m_parentGroup.AbsolutePosition = newpos; + return; + } + + } ScheduleTerseUpdate(); //SendTerseUpdateToAllClients(); -- cgit v1.1