* Set some minimum values to avoid divide by zero errors.

0.6.5-rc1
Teravus Ovares 2009-04-17 04:38:31 +00:00
parent 0d00a767bc
commit e95fe66dd5
1 changed files with 14 additions and 0 deletions

View File

@ -91,24 +91,31 @@ namespace OpenSim.Region.Physics.OdePlugin
switch (pParam) switch (pParam)
{ {
case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY: case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY:
if (pValue < 0.01f) pValue = 0.01f;
m_angularDeflectionEfficiency = pValue; m_angularDeflectionEfficiency = pValue;
break; break;
case Vehicle.ANGULAR_DEFLECTION_TIMESCALE: case Vehicle.ANGULAR_DEFLECTION_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_angularDeflectionTimescale = pValue; m_angularDeflectionTimescale = pValue;
break; break;
case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE: case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_angularMotorDecayTimescale = pValue; m_angularMotorDecayTimescale = pValue;
break; break;
case Vehicle.ANGULAR_MOTOR_TIMESCALE: case Vehicle.ANGULAR_MOTOR_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_angularMotorTimescale = pValue; m_angularMotorTimescale = pValue;
break; break;
case Vehicle.BANKING_EFFICIENCY: case Vehicle.BANKING_EFFICIENCY:
if (pValue < 0.01f) pValue = 0.01f;
m_bankingEfficiency = pValue; m_bankingEfficiency = pValue;
break; break;
case Vehicle.BANKING_MIX: case Vehicle.BANKING_MIX:
if (pValue < 0.01f) pValue = 0.01f;
m_bankingMix = pValue; m_bankingMix = pValue;
break; break;
case Vehicle.BANKING_TIMESCALE: case Vehicle.BANKING_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_bankingTimescale = pValue; m_bankingTimescale = pValue;
break; break;
case Vehicle.BUOYANCY: case Vehicle.BUOYANCY:
@ -121,24 +128,31 @@ namespace OpenSim.Region.Physics.OdePlugin
m_hoverHeight = pValue; m_hoverHeight = pValue;
break; break;
case Vehicle.HOVER_TIMESCALE: case Vehicle.HOVER_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_hoverTimescale = pValue; m_hoverTimescale = pValue;
break; break;
case Vehicle.LINEAR_DEFLECTION_EFFICIENCY: case Vehicle.LINEAR_DEFLECTION_EFFICIENCY:
if (pValue < 0.01f) pValue = 0.01f;
m_linearDeflectionEfficiency = pValue; m_linearDeflectionEfficiency = pValue;
break; break;
case Vehicle.LINEAR_DEFLECTION_TIMESCALE: case Vehicle.LINEAR_DEFLECTION_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_linearDeflectionTimescale = pValue; m_linearDeflectionTimescale = pValue;
break; break;
case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE: case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_linearMotorDecayTimescale = pValue; m_linearMotorDecayTimescale = pValue;
break; break;
case Vehicle.LINEAR_MOTOR_TIMESCALE: case Vehicle.LINEAR_MOTOR_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_linearMotorTimescale = pValue; m_linearMotorTimescale = pValue;
break; break;
case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY: case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY:
if (pValue < 0.01f) pValue = 0.01f;
m_verticalAttractionEfficiency = pValue; m_verticalAttractionEfficiency = pValue;
break; break;
case Vehicle.VERTICAL_ATTRACTION_TIMESCALE: case Vehicle.VERTICAL_ATTRACTION_TIMESCALE:
if (pValue < 0.01f) pValue = 0.01f;
m_verticalAttractionTimescale = pValue; m_verticalAttractionTimescale = pValue;
break; break;