From 22501ea06d987664951e453beaeb0146ff81c3c6 Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Sun, 10 Jan 2016 16:42:23 -0800 Subject: BulletSim: fix Mantis 7798: land collisions not working. --- OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs index e8ea604..b50e4cc 100755 --- a/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs +++ b/OpenSim/Region/PhysicsModules/BulletS/BSPhysObject.cs @@ -463,11 +463,15 @@ public abstract class BSPhysObject : PhysicsActor bool ret = false; // if 'collidee' is null, that means it is terrain - uint collideeLocalID = (collidee == null) ? PhysScene.TerrainManager.HighestTerrainID : collidee.LocalID; + uint collideeLocalID = (collidee == null) ? BSScene.TERRAIN_ID : collidee.LocalID; + // All terrain goes by the TERRAIN_ID id when passed up as a collision + if (collideeLocalID <= PhysScene.TerrainManager.HighestTerrainID) { + collideeLocalID = BSScene.TERRAIN_ID; + } // The following lines make IsColliding(), CollidingGround() and CollidingObj work CollidingStep = PhysScene.SimulationStep; - if (collideeLocalID <= PhysScene.TerrainManager.HighestTerrainID) + if (collideeLocalID == BSScene.TERRAIN_ID) { CollidingGroundStep = PhysScene.SimulationStep; } -- cgit v1.1