From 833cc54b03627398d45b21688ec092d514775679 Mon Sep 17 00:00:00 2001 From: sprunk Date: Fri, 23 Aug 2024 00:07:45 +0200 Subject: [PATCH] Revert "Revert "Fix numBounce -1 not being unlimited (#1463)"" This reverts commit 77272e955508ab2ebec11a223ee26eb1bcd65b60. --- rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp b/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp index 68fb787b55..0e53908de3 100644 --- a/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp +++ b/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp @@ -316,9 +316,12 @@ 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 ((bounces + 1) > weaponDef->numBounce) + if (weaponDef->numBounce != -1 // infinite + && bounces >= weaponDef->numBounce) return; + if (luaMoveCtrl) return; if (ttl <= 0) {