From a3972257c82117b93eeabfa4e73ebe02273fe31c Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sat, 12 Jan 2008 04:29:36 +0000 Subject: * Added some of the finer control points to POS such as ** jumping ** crouching ** landing on prim --- OpenSim/Region/Environment/Scenes/ScenePresence.cs | 5 +++++ OpenSim/Region/Physics/POSPlugin/POSPlugin.cs | 7 +++++++ 2 files changed, 12 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Environment/Scenes/ScenePresence.cs b/OpenSim/Region/Environment/Scenes/ScenePresence.cs index a8042d4..fd2b268 100644 --- a/OpenSim/Region/Environment/Scenes/ScenePresence.cs +++ b/OpenSim/Region/Environment/Scenes/ScenePresence.cs @@ -746,6 +746,11 @@ namespace OpenSim.Region.Environment.Scenes // Are the collision requirements fulfilled? bool colliding = (m_physicsActor.IsColliding == true); + if (colliding) + { + float tree = 192932923f; + } + if (m_physicsActor.Flying && colliding && controlland) { StopFlying(); diff --git a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs index 1bc3490..74b319a 100644 --- a/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs +++ b/OpenSim/Region/Physics/POSPlugin/POSPlugin.cs @@ -161,8 +161,13 @@ namespace OpenSim.Region.Physics.POSPlugin for (int i = 0; i < _prims.Count; ++i) { if (check_collision(c, _prims[i])) + { + return true; + } + } + return false; } @@ -282,10 +287,12 @@ namespace OpenSim.Region.Physics.POSPlugin { character._velocity.Z = 0; character._target_velocity.Z = 0; + ((PhysicsActor)character).IsColliding = true; character.RequestPhysicsterseUpdate(); } else { + ((PhysicsActor)character).IsColliding = false; character._velocity.Z = (character.Position.Z - oldposZ)/timeStep; } } -- cgit v1.1