diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-21 10:55:39 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-04-21 10:55:39 +0200 |
commit | 7cc3410846796a7bb0946384c7e22652f2bb60e6 (patch) | |
tree | 0b3d6d0675c44c21c83541f9f9c71e6244c6cf06 /src/weapons/BulletInfo.cpp | |
parent | Merge remote-tracking branch 'upstream/master' (diff) | |
parent | librw skin pipe (diff) | |
download | re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.gz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.bz2 re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.lz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.xz re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.tar.zst re3-7cc3410846796a7bb0946384c7e22652f2bb60e6.zip |
Diffstat (limited to '')
-rw-r--r-- | src/weapons/BulletInfo.cpp | 24 |
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; |