diff options
author | Teravus Ovares | 2009-04-17 04:38:31 +0000 |
---|---|---|
committer | Teravus Ovares | 2009-04-17 04:38:31 +0000 |
commit | e95fe66dd506dac7455a61654ff0af778ac6016f (patch) | |
tree | 18ce4f5231343320a3b8a8aabcecea95400590eb | |
parent | * Commit a few fixes to the Vehicle settings (diff) | |
download | opensim-SC_OLD-e95fe66dd506dac7455a61654ff0af778ac6016f.zip opensim-SC_OLD-e95fe66dd506dac7455a61654ff0af778ac6016f.tar.gz opensim-SC_OLD-e95fe66dd506dac7455a61654ff0af778ac6016f.tar.bz2 opensim-SC_OLD-e95fe66dd506dac7455a61654ff0af778ac6016f.tar.xz |
* Set some minimum values to avoid divide by zero errors.
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs index 3a99b48..12b623d 100644 --- a/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs +++ b/OpenSim/Region/Physics/OdePlugin/ODEVehicleSettings.cs | |||
@@ -91,24 +91,31 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
91 | switch (pParam) | 91 | switch (pParam) |
92 | { | 92 | { |
93 | case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY: | 93 | case Vehicle.ANGULAR_DEFLECTION_EFFICIENCY: |
94 | if (pValue < 0.01f) pValue = 0.01f; | ||
94 | m_angularDeflectionEfficiency = pValue; | 95 | m_angularDeflectionEfficiency = pValue; |
95 | break; | 96 | break; |
96 | case Vehicle.ANGULAR_DEFLECTION_TIMESCALE: | 97 | case Vehicle.ANGULAR_DEFLECTION_TIMESCALE: |
98 | if (pValue < 0.01f) pValue = 0.01f; | ||
97 | m_angularDeflectionTimescale = pValue; | 99 | m_angularDeflectionTimescale = pValue; |
98 | break; | 100 | break; |
99 | case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE: | 101 | case Vehicle.ANGULAR_MOTOR_DECAY_TIMESCALE: |
102 | if (pValue < 0.01f) pValue = 0.01f; | ||
100 | m_angularMotorDecayTimescale = pValue; | 103 | m_angularMotorDecayTimescale = pValue; |
101 | break; | 104 | break; |
102 | case Vehicle.ANGULAR_MOTOR_TIMESCALE: | 105 | case Vehicle.ANGULAR_MOTOR_TIMESCALE: |
106 | if (pValue < 0.01f) pValue = 0.01f; | ||
103 | m_angularMotorTimescale = pValue; | 107 | m_angularMotorTimescale = pValue; |
104 | break; | 108 | break; |
105 | case Vehicle.BANKING_EFFICIENCY: | 109 | case Vehicle.BANKING_EFFICIENCY: |
110 | if (pValue < 0.01f) pValue = 0.01f; | ||
106 | m_bankingEfficiency = pValue; | 111 | m_bankingEfficiency = pValue; |
107 | break; | 112 | break; |
108 | case Vehicle.BANKING_MIX: | 113 | case Vehicle.BANKING_MIX: |
114 | if (pValue < 0.01f) pValue = 0.01f; | ||
109 | m_bankingMix = pValue; | 115 | m_bankingMix = pValue; |
110 | break; | 116 | break; |
111 | case Vehicle.BANKING_TIMESCALE: | 117 | case Vehicle.BANKING_TIMESCALE: |
118 | if (pValue < 0.01f) pValue = 0.01f; | ||
112 | m_bankingTimescale = pValue; | 119 | m_bankingTimescale = pValue; |
113 | break; | 120 | break; |
114 | case Vehicle.BUOYANCY: | 121 | case Vehicle.BUOYANCY: |
@@ -121,24 +128,31 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
121 | m_hoverHeight = pValue; | 128 | m_hoverHeight = pValue; |
122 | break; | 129 | break; |
123 | case Vehicle.HOVER_TIMESCALE: | 130 | case Vehicle.HOVER_TIMESCALE: |
131 | if (pValue < 0.01f) pValue = 0.01f; | ||
124 | m_hoverTimescale = pValue; | 132 | m_hoverTimescale = pValue; |
125 | break; | 133 | break; |
126 | case Vehicle.LINEAR_DEFLECTION_EFFICIENCY: | 134 | case Vehicle.LINEAR_DEFLECTION_EFFICIENCY: |
135 | if (pValue < 0.01f) pValue = 0.01f; | ||
127 | m_linearDeflectionEfficiency = pValue; | 136 | m_linearDeflectionEfficiency = pValue; |
128 | break; | 137 | break; |
129 | case Vehicle.LINEAR_DEFLECTION_TIMESCALE: | 138 | case Vehicle.LINEAR_DEFLECTION_TIMESCALE: |
139 | if (pValue < 0.01f) pValue = 0.01f; | ||
130 | m_linearDeflectionTimescale = pValue; | 140 | m_linearDeflectionTimescale = pValue; |
131 | break; | 141 | break; |
132 | case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE: | 142 | case Vehicle.LINEAR_MOTOR_DECAY_TIMESCALE: |
143 | if (pValue < 0.01f) pValue = 0.01f; | ||
133 | m_linearMotorDecayTimescale = pValue; | 144 | m_linearMotorDecayTimescale = pValue; |
134 | break; | 145 | break; |
135 | case Vehicle.LINEAR_MOTOR_TIMESCALE: | 146 | case Vehicle.LINEAR_MOTOR_TIMESCALE: |
147 | if (pValue < 0.01f) pValue = 0.01f; | ||
136 | m_linearMotorTimescale = pValue; | 148 | m_linearMotorTimescale = pValue; |
137 | break; | 149 | break; |
138 | case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY: | 150 | case Vehicle.VERTICAL_ATTRACTION_EFFICIENCY: |
151 | if (pValue < 0.01f) pValue = 0.01f; | ||
139 | m_verticalAttractionEfficiency = pValue; | 152 | m_verticalAttractionEfficiency = pValue; |
140 | break; | 153 | break; |
141 | case Vehicle.VERTICAL_ATTRACTION_TIMESCALE: | 154 | case Vehicle.VERTICAL_ATTRACTION_TIMESCALE: |
155 | if (pValue < 0.01f) pValue = 0.01f; | ||
142 | m_verticalAttractionTimescale = pValue; | 156 | m_verticalAttractionTimescale = pValue; |
143 | break; | 157 | break; |
144 | 158 | ||