diff options
Diffstat (limited to '')
-rw-r--r-- | linden/indra/newview/llviewerpartsource.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/linden/indra/newview/llviewerpartsource.cpp b/linden/indra/newview/llviewerpartsource.cpp index ceb6761..39869e2 100644 --- a/linden/indra/newview/llviewerpartsource.cpp +++ b/linden/indra/newview/llviewerpartsource.cpp | |||
@@ -213,9 +213,9 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
213 | F32 mvs; | 213 | F32 mvs; |
214 | do | 214 | do |
215 | { | 215 | { |
216 | part_dir_vector.mV[VX] = frand(2.f) - 1.f; | 216 | part_dir_vector.mV[VX] = ll_frand(2.f) - 1.f; |
217 | part_dir_vector.mV[VY] = frand(2.f) - 1.f; | 217 | part_dir_vector.mV[VY] = ll_frand(2.f) - 1.f; |
218 | part_dir_vector.mV[VZ] = frand(2.f) - 1.f; | 218 | part_dir_vector.mV[VZ] = ll_frand(2.f) - 1.f; |
219 | mvs = part_dir_vector.magVecSquared(); | 219 | mvs = part_dir_vector.magVecSquared(); |
220 | } | 220 | } |
221 | while ((mvs > 1.f) || (mvs < 0.01f)); | 221 | while ((mvs > 1.f) || (mvs < 0.01f)); |
@@ -223,7 +223,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
223 | part_dir_vector.normVec(); | 223 | part_dir_vector.normVec(); |
224 | part.mPosAgent += mPartSysData.mBurstRadius*part_dir_vector; | 224 | part.mPosAgent += mPartSysData.mBurstRadius*part_dir_vector; |
225 | part.mVelocity = part_dir_vector; | 225 | part.mVelocity = part_dir_vector; |
226 | F32 speed = mPartSysData.mBurstSpeedMin + frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); | 226 | F32 speed = mPartSysData.mBurstSpeedMin + ll_frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); |
227 | part.mVelocity *= speed; | 227 | part.mVelocity *= speed; |
228 | } | 228 | } |
229 | else if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE | 229 | else if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE |
@@ -242,10 +242,10 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
242 | F32 outerAngle = mPartSysData.mOuterAngle; | 242 | F32 outerAngle = mPartSysData.mOuterAngle; |
243 | 243 | ||
244 | // generate a random angle within the given space... | 244 | // generate a random angle within the given space... |
245 | F32 angle = innerAngle + frand(outerAngle - innerAngle); | 245 | F32 angle = innerAngle + ll_frand(outerAngle - innerAngle); |
246 | 246 | ||
247 | // split which side it will go on randomly... | 247 | // split which side it will go on randomly... |
248 | if (frand(1.0) < 0.5) | 248 | if (ll_frand() < 0.5) |
249 | { | 249 | { |
250 | angle = -angle; | 250 | angle = -angle; |
251 | } | 251 | } |
@@ -256,7 +256,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
256 | // If this is a cone pattern, rotate again to create the cone. | 256 | // If this is a cone pattern, rotate again to create the cone. |
257 | if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE) | 257 | if (mPartSysData.mPattern & LLPartSysData::LL_PART_SRC_PATTERN_ANGLE_CONE) |
258 | { | 258 | { |
259 | part_dir_vector.rotVec(frand(4*F_PI), 0.0, 0.0, 1.0); | 259 | part_dir_vector.rotVec(ll_frand(4*F_PI), 0.0, 0.0, 1.0); |
260 | } | 260 | } |
261 | 261 | ||
262 | // Only apply this rotation if using the deprecated angles. | 262 | // Only apply this rotation if using the deprecated angles. |
@@ -276,7 +276,7 @@ void LLViewerPartSourceScript::update(const F32 dt) | |||
276 | 276 | ||
277 | part.mVelocity = part_dir_vector; | 277 | part.mVelocity = part_dir_vector; |
278 | 278 | ||
279 | F32 speed = mPartSysData.mBurstSpeedMin + frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); | 279 | F32 speed = mPartSysData.mBurstSpeedMin + ll_frand(mPartSysData.mBurstSpeedMax - mPartSysData.mBurstSpeedMin); |
280 | part.mVelocity *= speed; | 280 | part.mVelocity *= speed; |
281 | } | 281 | } |
282 | else | 282 | else |
@@ -459,7 +459,7 @@ void LLViewerPartSourceSpiral::update(const F32 dt) | |||
459 | part.mLastUpdateTime = 0.f; | 459 | part.mLastUpdateTime = 0.f; |
460 | part.mScale.mV[0] = 0.25f; | 460 | part.mScale.mV[0] = 0.25f; |
461 | part.mScale.mV[1] = 0.25f; | 461 | part.mScale.mV[1] = 0.25f; |
462 | part.mParameter = frand(F_TWO_PI); | 462 | part.mParameter = ll_frand(F_TWO_PI); |
463 | 463 | ||
464 | gWorldPointer->mPartSim.addPart(part); | 464 | gWorldPointer->mPartSim.addPart(part); |
465 | } | 465 | } |
@@ -720,7 +720,7 @@ void LLViewerPartSourceChat::update(const F32 dt) | |||
720 | part.mLastUpdateTime = 0.f; | 720 | part.mLastUpdateTime = 0.f; |
721 | part.mScale.mV[0] = 0.25f; | 721 | part.mScale.mV[0] = 0.25f; |
722 | part.mScale.mV[1] = 0.25f; | 722 | part.mScale.mV[1] = 0.25f; |
723 | part.mParameter = frand(F_TWO_PI); | 723 | part.mParameter = ll_frand(F_TWO_PI); |
724 | 724 | ||
725 | gWorldPointer->mPartSim.addPart(part); | 725 | gWorldPointer->mPartSim.addPart(part); |
726 | } | 726 | } |