summaryrefslogtreecommitdiffstats
path: root/src/vehicles/Heli.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-05-12 01:24:57 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-05-12 23:18:54 +0200
commitc2ac6b3759901ecede7b22c1e9ab9f5a04ddd527 (patch)
treecf51d6ab8430cd186e02f0e8105004f8e5476728 /src/vehicles/Heli.cpp
parentfix shotgun (diff)
downloadre3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.gz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.bz2
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.lz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.xz
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.tar.zst
re3-c2ac6b3759901ecede7b22c1e9ab9f5a04ddd527.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 e4cd5883..7b62b461 100644
--- a/src/vehicles/Heli.cpp
+++ b/src/vehicles/Heli.cpp
@@ -996,7 +996,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;
@@ -1023,7 +1023,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;
}