From b5dec9a37f204ddc970cfa90e7ebef53114f4dcf Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 14 Dec 2008 07:29:40 +0000 Subject: [PATCH] * Added Avatar minimum size in the ODEPlugin and a stern warning about setting the capsule size too low in OpenSim.ini --- OpenSim/Region/Physics/OdePlugin/ODECharacter.cs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs index 666fa8684f..de0969171c 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODECharacter.cs @@ -419,8 +419,23 @@ namespace OpenSim.Region.Physics.OdePlugin // place that is safe to call this routine AvatarGeomAndBodyCreation. private void AvatarGeomAndBodyCreation(float npositionX, float npositionY, float npositionZ, float tensor) { + //CAPSULE_LENGTH = -5; + //CAPSULE_RADIUS = -5; int dAMotorEuler = 1; _parent_scene.waitForSpaceUnlock(_parent_scene.space); + if (CAPSULE_LENGTH <= 0) + { + m_log.Warn("[PHYSICS]: The capsule size you specified in opensim.ini is invalid! Setting it to the smallest possible size!"); + CAPSULE_LENGTH = 0.01f; + + } + + if (CAPSULE_RADIUS <= 0) + { + m_log.Warn("[PHYSICS]: The capsule size you specified in opensim.ini is invalid! Setting it to the smallest possible size!"); + CAPSULE_RADIUS = 0.01f; + + } Shell = d.CreateCapsule(_parent_scene.space, CAPSULE_RADIUS, CAPSULE_LENGTH); d.GeomSetCategoryBits(Shell, (int)m_collisionCategories);