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

Bundle fire damage into larger chunks #4223

Merged
merged 1 commit into from
Sep 3, 2016
Merged

Bundle fire damage into larger chunks #4223

merged 1 commit into from
Sep 3, 2016

Conversation

PabstMirror
Copy link
Contributor

Ref #4206

Fire damage comes in as a continuous stream, but each bit is lower than the threshold to trigger unknown damage. This saves the little chunks until together they addup to something that would be enough to trigger a wound from the extension.

Without this we add damage to bodyPartStatus but never create any wounds, so the damage would not be removable when in basic medical or healAfterBandage.

This also makes damage type "" into unknown which is consistent with the non-dll wound code.

@PabstMirror PabstMirror added kind/bug-fix Release Notes: **FIXED:** needs review labels Aug 9, 2016
@PabstMirror PabstMirror added this to the 3.7.0 milestone Aug 9, 2016
@nicolasbadano
Copy link
Contributor

Good catch @PabstMirror! 👍

@thojkooi
Copy link
Contributor

thojkooi commented Aug 9, 2016

How would this look like with the new handle damage approach for the medical rewrite?

@commy2
Copy link
Contributor

commy2 commented Aug 9, 2016

The new approach just ignores damage below a certain threshold

// For burning damage we will get a ton of very small hits of damage; they are too small to create any wounds
// Save them up in a variable and run when it is over a noticable amount

if ((_typeOfProjectile == "") && {_newDamage < 0.15} && {
Copy link
Contributor

@thojkooi thojkooi Aug 27, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are we sure that fire is the only damage source that matches this condition? iirc falling also gives you an empty projectile string. Same with being driven over and a few other cases.

And would it matter if we match those here as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This only kicks in for damage < 0.15 and I think most physx damage should be more than that, but can't guarentee.

The core problem is that we are increasing bodyPartStatus without adding new wounds.
Without wounds, the damage can't be healed, because bandageLocal does:
if (count _openWounds == 0) exitWith {false}; // nothing to do here!

I could try to do the fix there; so that GVAR(healHitPointAfterAdvBandage) or basic medical can still heal the hitpoints even if there are no wounds?

@thojkooi
Copy link
Contributor

thojkooi commented Sep 3, 2016

👍

@thojkooi thojkooi merged commit 1c5761f into master Sep 3, 2016
@thojkooi thojkooi deleted the handleFireDamage branch September 3, 2016 20:00
PabstMirror added a commit that referenced this pull request Apr 22, 2017
PabstMirror added a commit that referenced this pull request Jun 5, 2017
* Bundle fire damage into bigger chunks

Redo #4223

* Use same values

* Decrease combine cuttoff to 0.1
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.

4 participants