summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Heli.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2020-05-12 23:55:52 +0200
committerSergeanur <s.anureev@yandex.ua>2020-05-12 23:55:52 +0200
commit7c2b9478d52e5122eff2e11298f31bfc1b896f94 (patch)
tree53ad6828eb1366a5dd00d9977eec330bd3d7b52f /src/vehicles/Heli.cpp
parentMerge remote-tracking branch 'origin/master' into miami (diff)
parentMerge pull request #537 from ShFil119/linux_warns (diff)
downloadre3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.gz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.bz2
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.lz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.xz
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.tar.zst
re3-7c2b9478d52e5122eff2e11298f31bfc1b896f94.zip
Diffstat (limited to 'src/vehicles/Heli.cpp')
-rw-r--r--src/vehicles/Heli.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp
index d9c364d2..5cd6488a 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -980,7 +980,7 @@ CHeli::TestRocketCollision(CVector *rocketPos)
for(i = 0; i < NUM_HELIS; i++){
if(pHelis[i] && !pHelis[i]->bExplosionProof && (*rocketPos - pHelis[i]->GetPosition()).MagnitudeSqr() < sq(8.0f)){
- pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
+ pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
hit = true;
@@ -1007,7 +1007,7 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i
if(pHelis[i]->m_heliType == HELI_CATALINA && pHelis[i]->m_nBulletDamage > 400 ||
pHelis[i]->m_heliType != HELI_CATALINA && pHelis[i]->m_nBulletDamage > 700){
- pHelis[i]->m_fAngularSpeed = (CGeneral::GetRandomNumber() < RAND_MAX/2) ? 0.05f : -0.05f;
+ pHelis[i]->m_fAngularSpeed = CGeneral::GetRandomTrueFalse() ? 0.05f : -0.05f;
pHelis[i]->m_heliStatus = HELI_STATUS_SHOT_DOWN;
pHelis[i]->m_nExplosionTimer = CTimer::GetTimeInMilliseconds() + 10000;
}