diff options
author | Filip Gawin <filip.gawin@zoho.com> | 2019-08-27 20:50:59 +0200 |
---|---|---|
committer | Filip Gawin <filip.gawin@zoho.com> | 2019-08-27 22:29:23 +0200 |
commit | 01ac2929cd723b579454788ffbe9579d1863d240 (patch) | |
tree | 84f9f7df642f09a32adb1fa779ffeeb15fa2c206 /src/vehicles/Heli.cpp | |
parent | 2fabbc3b4cab40220986f402569af64673cb4cd9 (diff) |
Cleanup
Diffstat (limited to 'src/vehicles/Heli.cpp')
-rw-r--r-- | src/vehicles/Heli.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vehicles/Heli.cpp b/src/vehicles/Heli.cpp index 39fc7ec4..aab9dd0d 100644 --- a/src/vehicles/Heli.cpp +++ b/src/vehicles/Heli.cpp @@ -223,19 +223,19 @@ CHeli::ProcessControl(void) switch(m_heliStatus){ case HELI_STATUS_HOVER: groundZ = CWorld::FindGroundZFor3DCoord(GetPosition().x, GetPosition().y, 1000.0f, nil); - m_fTargetZ = Max(groundZ, m_fTargetZ) + 8.0f; + m_fTargetZ = max(groundZ, m_fTargetZ) + 8.0f; break; case HELI_STATUS_SHOT_DOWN: groundZ = CWorld::FindGroundZFor3DCoord(GetPosition().x, GetPosition().y, 1000.0f, nil); - m_fTargetZ = Max(groundZ, m_fTargetZ) + 8.0f + m_fTargetOffset; + m_fTargetZ = max(groundZ, m_fTargetZ) + 8.0f + m_fTargetOffset; break; case HELI_STATUS_HOVER2: groundZ = CWorld::FindGroundZFor3DCoord(GetPosition().x, GetPosition().y, 1000.0f, nil); - m_fTargetZ = Max(groundZ, m_fTargetZ) + 8.0f + m_fTargetOffset; + m_fTargetZ = max(groundZ, m_fTargetZ) + 8.0f + m_fTargetOffset; break; default: groundZ = CWorld::FindGroundZFor3DCoord(GetPosition().x, GetPosition().y, 1000.0f, nil); - m_fTargetZ = Max(groundZ, m_fTargetZ) + 12.0f; + m_fTargetZ = max(groundZ, m_fTargetZ) + 12.0f; break; } @@ -994,7 +994,7 @@ CHeli::TestBulletCollision(CVector *line0, CVector *line1, CVector *bulletPos, i float distToHeli = (pHelis[i]->GetPosition() - *line0).Magnitude(); CVector line = (*line1 - *line0); float lineLength = line.Magnitude(); - *bulletPos = *line0 + line*Max(1.0f, distToHeli-5.0f); + *bulletPos = *line0 + line*max(1.0f, distToHeli-5.0f); pHelis[i]->m_nBulletDamage += damage; |