Skip to content

Commit cdeeee6

Browse files
authored
Merge pull request scp-fs2open#1605 from Flip-Sandwich/subsysdamagefix
Negative damages no longer heal subsystems
2 parents 8b5f257 + 65941e2 commit cdeeee6

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

code/ship/ship.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17918,7 +17918,11 @@ float ArmorType::GetDamage(float damage_applied, int in_damage_type_idx, float d
1791817918
// Nuke: check to see if we need to difficulty scale damage last
1791917919
if (adtp->difficulty_scale_type == ADT_DIFF_SCALE_LAST)
1792017920
damage_applied *= diff_dmg_scale;
17921-
17921+
17922+
// Face: negative damages should not heal you!!!
17923+
if (damage_applied < 0.0f)
17924+
damage_applied = 0.0f;
17925+
1792217926
return damage_applied;
1792317927
}
1792417928
// fail return is fail

0 commit comments

Comments
 (0)