Commit Graph

2 Commits

Author SHA1 Message Date
PabstMirror
e8693c8db9
Various - Use configOf command for faster lookup (#8100)
* configOf

* replace some use of CBA_fnc_getObjectConfig
2021-02-18 12:58:08 -06:00
pterolatypus
c949a07c83
Medical Engine - Apply damage to the correct hitpoint (#7415)
* HandleDamage uses armour values to determine which hitpoint was damaged

* Tidied up comments

* Newlines

* Tabs? In MY code?!

* Added uniform caching and option to force disable caching

* Review suggestions

* Review suggestions/code style

* Spelling and select

* Removed unnecessary validity check

* Apply suggestions from code review

Co-Authored-By: commy2 <commy-2@gmx.de>

* Tweaks and optimisations, removed _noCache

Also fixed cache nil vs empty

* Different approach with fewer loops
Lookup is now done per-hitpoint and default values cached
fnc_getItemArmor made a helper function as it's now only a few lines

* Tabs & newlines

* Moved uniform logic inside helper function

* Optimisations

* Tweaks & optimisations, improved formatting

* Ignore explosionShielding

* Moved getArmor back to separate func, add per-unit caching

* Formatting

* Review suggestions

Co-authored-by: commy2 <commy-2@gmx.de>
2020-02-28 17:54:53 +01:00