From 77272e955508ab2ebec11a223ee26eb1bcd65b60 Mon Sep 17 00:00:00 2001 From: lostsquirrel Date: Mon, 12 Aug 2024 20:12:26 +0100 Subject: [PATCH] Revert "Fix numBounce -1 not being unlimited (#1463)" This reverts commit 14b780e8cddc2226659ba4119eebb95ec6c98435. --- rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp b/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp index 0e53908de3..68fb787b55 100644 --- a/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp +++ b/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp @@ -316,12 +316,9 @@ void CWeaponProjectile::UpdateGroundBounce() // projectile is not allowed to bounce on either surface if (!weaponDef->groundBounce && !weaponDef->waterBounce) return; - // maximum number of bounce already reached? - if (weaponDef->numBounce != -1 // infinite - && bounces >= weaponDef->numBounce) + if ((bounces + 1) > weaponDef->numBounce) return; - if (luaMoveCtrl) return; if (ttl <= 0) {