summaryrefslogtreecommitdiffstats
path: root/src/weapons/BulletInfo.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-04-19 18:34:08 +0200
committerFilip Gawin <filip.gawin@zoho.com>2020-04-20 18:18:46 +0200
commit370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96 (patch)
tree5f5c66a542d7a121a7db88fed66e31f2a263b206 /src/weapons/BulletInfo.cpp
parentMerge pull request #474 from Nick007J/master (diff)
downloadre3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar.gz
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar.bz2
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar.lz
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar.xz
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.tar.zst
re3-370c4e48cd87122e8d38f1a72f6b8f62ff7b9c96.zip
Diffstat (limited to 'src/weapons/BulletInfo.cpp')
-rw-r--r--src/weapons/BulletInfo.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/src/weapons/BulletInfo.cpp b/src/weapons/BulletInfo.cpp
index abf5c061..36c3cc78 100644
--- a/src/weapons/BulletInfo.cpp
+++ b/src/weapons/BulletInfo.cpp
@@ -232,35 +232,35 @@ bool CBulletInfo::TestForSniperBullet(float x1, float x2, float y1, float y2, fl
#else
float minP = 0.0f;
float maxP = 1.0f;
- float minX = min(PlayerSniperBulletStart.x, PlayerSniperBulletEnd.x);
- float maxX = max(PlayerSniperBulletStart.x, PlayerSniperBulletEnd.x);
+ float minX = Min(PlayerSniperBulletStart.x, PlayerSniperBulletEnd.x);
+ float maxX = Max(PlayerSniperBulletStart.x, PlayerSniperBulletEnd.x);
if (minX < x2 || maxX > x1) {
if (minX < x1)
- minP = min(minP, (x1 - minX) / (maxX - minX));
+ minP = Min(minP, (x1 - minX) / (maxX - minX));
if (maxX > x2)
- maxP = max(maxP, (maxX - x2) / (maxX - minX));
+ maxP = Max(maxP, (maxX - x2) / (maxX - minX));
}
else
return false;
- float minY = min(PlayerSniperBulletStart.y, PlayerSniperBulletEnd.y);
- float maxY = max(PlayerSniperBulletStart.y, PlayerSniperBulletEnd.y);
+ float minY = Min(PlayerSniperBulletStart.y, PlayerSniperBulletEnd.y);
+ float maxY = Max(PlayerSniperBulletStart.y, PlayerSniperBulletEnd.y);
if (minY < y2 || maxY > y1) {
if (minY < y1)
- minP = min(minP, (y1 - minY) / (maxY - minY));
+ minP = Min(minP, (y1 - minY) / (maxY - minY));
if (maxY > y2)
- maxP = max(maxP, (maxY - y2) / (maxY - minY));
+ maxP = Max(maxP, (maxY - y2) / (maxY - minY));
}
#ifdef FIX_BUGS
else
return false;
#endif
- float minZ = min(PlayerSniperBulletStart.z, PlayerSniperBulletEnd.z);
- float maxZ = max(PlayerSniperBulletStart.z, PlayerSniperBulletEnd.z);
+ float minZ = Min(PlayerSniperBulletStart.z, PlayerSniperBulletEnd.z);
+ float maxZ = Max(PlayerSniperBulletStart.z, PlayerSniperBulletEnd.z);
if (minZ < z2 || maxZ > z1) {
if (minZ < z1)
- minP = min(minP, (z1 - minZ) / (maxZ - minZ));
+ minP = Min(minP, (z1 - minZ) / (maxZ - minZ));
if (maxZ > z2)
- maxP = max(maxP, (maxZ - z2) / (maxZ - minZ));
+ maxP = Max(maxP, (maxZ - z2) / (maxZ - minZ));
}
else
return false;