Skip to content

Commit

Permalink
fix wrong calculate
Browse files Browse the repository at this point in the history
  • Loading branch information
LightBlueCube authored Sep 6, 2024
1 parent 0a33165 commit 1ac19bd
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -2322,7 +2322,7 @@ function FW_UseBattery( batteryPortvar, playervar ) //actually void function( en
if( turretReplaced || teamChanged ) // replaced/hacked turret will spawn with 50% health
newHealth = int ( turret.GetMaxHealth() * GetCurrentPlaylistVarFloat( "fw_turret_hacked_health", TURRET_HACKED_HEALTH_PERCENTAGE ) )
// restore turret shield
int newShield = int ( min( turret.GetShieldHealthMax(), turret.GetShieldHealth() + ( turret.GetShieldHealth() * GetCurrentPlaylistVarFloat( "fw_turret_fixed_shield", TURRET_FIXED_SHIELD_PERCENTAGE ) ) ) )
int newShield = int ( min( turret.GetShieldHealthMax(), turret.GetShieldHealth() + ( turret.GetShieldHealthMax() * GetCurrentPlaylistVarFloat( "fw_turret_fixed_shield", TURRET_FIXED_SHIELD_PERCENTAGE ) ) ) )
if( turretReplaced || teamChanged ) // replaced/hacked turret will spawn with 50% shield
newShield = int ( turret.GetShieldHealthMax() * GetCurrentPlaylistVarFloat( "fw_turret_hacked_shield", TURRET_HACKED_SHIELD_PERCENTAGE ) )
// only do team score event if turret's shields down, encourage players to hack more turrets
Expand Down

0 comments on commit 1ac19bd

Please sign in to comment.