Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Heal hitpoint after bandage sets bodyPartStatus #4216

Merged
merged 1 commit into from
Aug 7, 2016
Merged

Conversation

PabstMirror
Copy link
Contributor

GVAR(healHitPointAfterAdvBandage) was only setting the hitpoint, but not changing the bodyPartStatus.
This caused later damage to always redamage the previously healed hitpoints because FUNC(handleDamage_advancedSetDamage) uses bodyPartStatus to set 4 hitpoints when taking new damage.

This changes advanced bandage to clear damage from bodyPartStatus when a hitpoint has been fully healed. It then calls FUNC(handleDamage_advancedSetDamage) to actually reset the damage.

Test case:

[] spawn { 
    [player, 0.8, "leg_r", "bullet"] call ace_medical_fnc_addDamageToUnit; 
    sleep 0.25; 
    [player, "bandage", "leg_r"] call ace_medical_fnc_treatmentAdvanced_bandageLocal; 
    sleep 0.25; 
    [player, 0.2, "body", "bullet"] call ace_medical_fnc_addDamageToUnit; 
};

Would leave the unit limping as the leg damage was healed, but was still on bodyPartStatus so it was reapplied when taking the later body damage.

@PabstMirror PabstMirror added the kind/bug-fix Release Notes: **FIXED:** label Aug 7, 2016
@PabstMirror PabstMirror added this to the 3.7.0 milestone Aug 7, 2016
@thojkooi thojkooi merged commit c2d127f into master Aug 7, 2016
@thojkooi thojkooi deleted the healHitPoint branch August 7, 2016 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug-fix Release Notes: **FIXED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants