Skip to content

Commit

Permalink
Modify damage handler to use true default handling on 1x modifier
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorAU committed Aug 17, 2020
1 parent 2026271 commit 5279f00
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions mission/functions/eventhandlers/fn_handleDamage.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,12 @@ if (_modifier != 1) then {
};

_damage = (_hitPointDamage#_hitIndex)+(_modifier*(_damage-(_hitPointDamage#_hitIndex)));
};

_unit setVariable ["GG_c_hitPointDamage",getAllHitPointsDamage _unit#2];
_unit setVariable ["GG_c_hitPointDamage",getAllHitPointsDamage _unit#2];

// take no damage if the round has been won
[_damage,0] select ROUND_OVER;
// take no damage if the round has been won
[_damage,0] select ROUND_OVER;
} else {
// Return nil if modifer is 1x and round isnt over to ensure no manipulation of damage taken.
if ROUND_OVER then {0};
};

0 comments on commit 5279f00

Please sign in to comment.