Page MenuHomeWildfire Games

Add back safeguard against killing an entity multiple times.
ClosedPublic

Authored by Freagarach on Aug 29 2020, 7:14 AM.

Details

Summary

Regression of rP24001.

Test Plan

Review code.

Diff Detail

Repository
rP 0 A.D. Public Repository
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Freagarach created this revision.Aug 29 2020, 7:14 AM

Could also just check for this.hitpoints && amount prior to reducing?

Freagarach requested review of this revision.Aug 29 2020, 7:24 AM

yes there is no point to call that function if one of it is zero

Freagarach updated this revision to Diff 13337.Aug 29 2020, 7:32 AM

Check earlier.

Silier accepted this revision.Aug 29 2020, 7:36 AM
This revision is now accepted and ready to land.Aug 29 2020, 7:36 AM
This revision was automatically updated to reflect the committed changes.
Freagarach added inline comments.Aug 29 2020, 7:49 AM
ps/trunk/binaries/data/mods/public/simulation/components/Health.js
238

(We should throw a error here when trying to subtract a negative amount.)

Thanks for the quick review @Angen :)