Commit Graph

67 Commits

Author SHA1 Message Date
PabstMirror
2cd935acbe
Medical Engine - Synchronize random unconscious anims (#8671)
* Medical Engine - Synchronize random unconscious anims

* Update addons/medical_engine/functions/fnc_applyAnimAfterRagdoll.sqf

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_engine/functions/fnc_applyAnimAfterRagdoll.sqf

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>

Co-authored-by: mharis001 <34453221+mharis001@users.noreply.github.com>
2021-11-11 16:34:56 -06:00
Whigital
2441ef493e
Medical Engine - Fix unconscious animation state checks (#8623) 2021-11-08 00:15:52 +01:00
PabstMirror
7bc6fdfa66
Cleanup - Trim all trailing whitespace (#8651) 2021-10-30 16:42:03 -05:00
BaerMitUmlaut
c7ff918554
Medical Engine - Disable third party medical systems (#8289)
Co-authored-by: jonpas <jonpas33@gmail.com>
2021-07-23 21:32:36 +02:00
Salluci
f6cefa76a2
Medical - Add Vehicle Crashes setting (#8149)
Co-authored-by: jonpas <jonpas33@gmail.com>
2021-04-20 13:10:50 +02:00
Steve Zhao
dd454bdfbe
Medical - Allow unconscious unit in Taru pods (#8168)
Co-authored-by: Filip Maciejewski <veteran29@users.noreply.github.com>
2021-04-20 11:59:11 +02:00
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
mharis001
0f08a18f89
Medical - Add force walk option to fracture setting (#7852)
* Medical - Add force walk option to fracture setting

* Add French translation

Co-authored-by: Elgin675 <elgin675@hotmail.com>

* Reduce calls to statusEffect_set (#7865)

* Reduce calls to statusEffect_set

* statusEffect_addType fracture to forcewalk

Co-authored-by: Elgin675 <elgin675@hotmail.com>
Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-08-22 19:37:15 -05:00
PabstMirror
46f3c55758
Medical Engine - Prevent issues with respawning and ragdoll animations (#7796) 2020-07-22 10:25:47 -05:00
diwako
b16ca5c204
Medical - Add unconscious animations (#7363)
* Add custom anim entries

* Switch to SQF based animation detection

* Add time out to CBA_fnc_waitUntilAndExecute

* Remove unneeded comments or defines

* Restore line break

* Styling and removal of not needed code

* Move waitForAnime and make it local nil

* Extended comment

* Add Kola to authors file

* Small bug fix in terms of animation names

* Add custom anim entries


Switch to SQF based animation detection


Add time out to CBA_fnc_waitUntilAndExecute


Remove unneeded comments or defines


Restore line break


Styling and removal of not needed code


Move waitForAnime and make it local nil


Extended comment


Add Kola to authors file


Small bug fix in terms of animation names

* Move animations into data folder

* add uppercase on sqf command

* Rename animation config names and files

* fix physx uncon fix

* Change initial after ragdoll animation name
2020-07-01 15:08:54 +02:00
pterolatypus
79ea841eeb
Medical Damage - Determine ammo damage type through config property (#7608)
* Determine ammo damage type through config property

* Tabs

* Add warning when property is missing

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Fixed up inheritance
Some classes were not editable;
changes moved to relevant subclasses instead

* Newlines for readability

* More sensible default value

* Fix mistakes I added

* Update addons/medical_damage/CfgAmmo.hpp

* Pre-cache special values for damage types

* Support # values

For backwards compatibility

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-04-07 21:52:20 -05:00
pterolatypus
90338fd893
Fix typo in HandleDamage (#7629) 2020-04-06 16:05:57 +01:00
PabstMirror
a84af7ba9a
Medical - Improve some error msgs (#7588) 2020-04-05 05:01:51 +02: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
Rutger "RedBery" Meijering
d6753250d1
Fixes typo in splint comparison (#7518) 2020-02-22 14:09:04 -06:00
PabstMirror
f9d181c72e
Medical - Fix addDamageToUnit (#7247) 2019-10-20 16:48:26 -05:00
PabstMirror
a71879ccea
Medical - Increase severity of falling damage and Improve non-selectionSpecific wounds (#7214)
* Medical - Increase severity of falling damage

* Improve non-selectionSpecific wounds

* Use macros for hitpoint indexes
2019-10-08 10:44:49 -05:00
PabstMirror
edd5c44853
Medical - Improve loading/unloading of unconc patients (#7109)
* Medical - Improve loading/unloading of unconc patients

* Update fnc_loadPersonLocal.sqf

* Multi-line

* Formating

* Update fnc_loadUnit.sqf
2019-09-05 15:56:53 -05:00
PabstMirror
ded81418e6
Medical Engine - Report any fatal head damage (#7103) 2019-07-16 13:00:28 -05:00
mharis001
08a7d2706e Add wounds var macros (#7058) 2019-06-22 13:36:27 -05:00
mharis001
44050df98b Medical Treatment - Modernize and Cleanup (#6933)
* Modernize and cleanup medical_treatment

* One line for each old public function

* Fix litterCleanupDelay name

* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Change wound data array

Drop unique id and merge classId and category

* Splinting and treatment and gui

* Add arm fractures and aim effects

* localizations and event

* fix

* fix merge for renamed files

* Fixes and code review changes

* Move medical logs clearing to treatment

* More cleanup work

* cleanup

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, rename bone images

* Fix args for setDead call in actionPlaceInBodyBag

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* disable calls to extension

* Update fnc_onMedicationUsage.sqf

* Medical - Skip unneeded setVars on initUnit (#6949)

*  Medical - Transfer state machine state on locality (#6950)

* Medical - Transfer state machine state on locality

* Fix feedback isUnconscious var

* Exclude AI

* Make UAV excludes consistant, formating

* Update fnc_treatmentFullHealLocal.sqf

* reset fractures on respawn

* Fix merge

* Add PAK time coefficient setting

* Fix medication

* Add ace_medical_replacementItems config array

* checkItems performance improvement

* Treatment - cap max animation speed (#6995)

* Treatment - cap max animation speed

and add lock to prevent AF from reseting anim

* Update fnc_getBandageTime.sqf

* Use local version of setAnimSpeedCoef

* Revert "Use local version of setAnimSpeedCoef"

This reverts commit 36c22a9047.

* Move replacementItems compiling to preInit

* Improve replacementItems compiling

* Cleanup splint functions, use macros for fractures

* Rename splintCondition to canSplint

* Add cprCreatesPulse setting

* Cleanup remaining functions

* Capitalize stringtable entry names

* getStitchTime function and fix treatment locations

* Update addons/medical_treatment/functions/fnc_getHealTime.sqf

Co-Authored-By: SilentSpike <silentspike100+Github@gmail.com>
2019-06-03 10:31:46 -05:00
PabstMirror
e56cc0d74e
Limping / Splint Treatment (#6947)
* Improve adjustment calcs / wound blood loss / medications

fix func descriptions

Calc wound blood loss on events

reorder includes so scritpmacroMed has global effect

trivial optimization for getCardiacOutput

Fix var

Fix wounds not reopening (nil _category)

Fix surgical kit inherting canBandage conditional

debug hitpoints

Update ACE_Medical_Treatment_Actions.hpp

Use woundBleeding for IS_BLEEDING macro

rework medication vars

comments

Reset var in init / fullHeal

Update addons/medical_treatment/functions/fnc_onMedicationUsage.sqf

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* Change wound data array

Drop unique id and merge classId and category

* Splinting and treatment and gui

* Add arm fractures and aim effects

* localizations and event

* fix

* cleanup

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* formating, rename bone images

* Apply suggestions from code review

Co-Authored-By: PabstMirror <pabstmirror@gmail.com>

* disable calls to extension

* Update fnc_onMedicationUsage.sqf

* Medical - Skip unneeded setVars on initUnit (#6949)

*  Medical - Transfer state machine state on locality (#6950)

* Medical - Transfer state machine state on locality

* Fix feedback isUnconscious var

* Exclude AI

* Make UAV excludes consistant, formating

* Update fnc_treatmentFullHealLocal.sqf

* reset fractures on respawn
2019-05-11 23:13:59 -05:00
commy2
64e640bcf2 revert a variable 2019-05-03 17:09:16 +02:00
commy2
744b9778df temporarily re-allowDamage when using setHit(PointDamage) 2019-05-03 17:03:17 +02:00
PabstMirror
0d7709673a
Medical Feedback - Fix DISABLE_VANILLA_DAMAGE_EFFECTS (#6966)
* Medical Feedback - Fix DISABLE_VANILLA_DAMAGE_EFFECTS

* Keep compatibilty with old ace_medical_lastDamageSource var name
2019-04-27 14:04:31 -05:00
PabstMirror
f2b9bf3a17 Update headers 2019-03-30 11:07:54 -05:00
Rutger "RedBery" Meijering
15036d7fd8 Fixes to unconsciousness and damageTypes systems (#6589)
* Fixes BleedingCoef having impact on bloodloss KO
Fixes incorrect var in setUnconscious

* Changes method for checking if typeOfDamage is valid
Adds check for if typeOfDamage is valid to extension version of woundsHandler

* Changes collision wound location select to a weighted system to make it more lethal at faster collisions
Adds collision and drowning damage types to config (drowning has no related wounds to prevent wounds being added while drowning).

* Fixes unneeded space

* Fixes minor mistake (body damage chance should go from 1 to 0 without ever becoming negative)
2019-03-21 19:33:51 +01:00
Magnetar
cc11ad051d Formatting. Lazy eval 2019-03-21 14:34:51 +01:00
Magnetar
89927a8b94 Missing privates. Lazy evaluation. 2019-03-17 21:26:15 +01:00
SilentSpike
11547d7ff8
Fix environmental damage sources (#6515)
* Tidy handle damage code
* Fix environmental damage conditions

- Vehicle damage would never occur because it doesn't fire all the
hitpoints
- Missing sanity check on fall damage to check that unit isn't in a
vehicle
- Getting hit by a vehicle while on foot can be detected by checking for
a shooter

* Improve collision handling

- All collisions have a `_shooter` so we simply first check for that because burning doesn't and it could happen at any velocity
- We don't actually care what caused the collision because they should all cause the same type of wounding
- The exception is fall damage because we want to prioritise wounding the legs, we assume if the `_unit` had downward velocity and `_shooter == _unit` that it was fall damage (not necessarily always true, but almost always is and there doesn't look to be a more specific way to check).
2018-08-15 07:57:11 +01:00
Dedmen Miller
7a0a00ea09 Cleanup using SQFLint (#6485)
* Use private
* Fix wrong spacing
* Fix wrong variable being used
* Cleanup empty line after header
* ace_common_fnc_getCountOfItem
* Remove useless _return variable
* Naming
2018-08-02 15:02:10 +01:00
Dedmen Miller
6bd8542eed Move #includes before function headers (#6484) 2018-07-30 10:22:14 +01:00
SilentSpike
0e50aca9d8
Add support to toggle allowDamage (#6266) 2018-07-18 19:31:29 +01:00
SilentSpike
34eb5553ea
Move scream and moan sounds to medical feedback (#6438)
* Move scream and moan sounds to medical feedback
* Move vanilla feedback overrides to medical feedback
* Update all function calls
* Use events to avoid a dependency
2018-07-18 19:21:27 +01:00
Bismarck
e566cbf35a Fixes damage redirection issues (#6231)
Units accumulate damage in the local variables
"ACE_Medical_Engine_$HitXXXX", but these are never reset. The way these
vars are used is as a single-damage-event tracker, and the end result of
not resetting their value when they're done being used is that a
specific $HitXXXX can accumulate enough damage to cause the "select
wound with highest damage" code to always select _it_ for the next wound
event, even if it wasn't the primary target of the last wound event.

I.E. I get shot in the right leg badly. If I then get winged in the left
arm, that wound will end up on my right leg, because when the code runs,
it finds QGVAR($HitRightLeg) > QGVAR($HitLeftArm), and so it applies the
wound to the right leg.
2018-07-16 23:49:06 +02:00
Glowbal
6576e5d014 Fix linting error 2018-07-15 16:28:39 +02:00
Glowbal
9d2e76e67a More component name fixes and small clean up 2018-07-15 16:24:04 +02:00
PabstMirror
382028e662 Fix updating body part visuals (#5141) 2017-06-08 13:50:38 -05:00
PabstMirror
f369ffaa04 Med rw handle fire damage (#5100)
* Bundle fire damage into bigger chunks

Redo #4223

* Use same values

* Decrease combine cuttoff to 0.1
2017-06-05 11:42:00 -05:00
PabstMirror
97ec22bd9a Switch heartbeat to waitAndExec, allow switching pain settings 2017-02-18 22:11:40 -06:00
ulteq
78bfc0c26d Simplified damage storage 2016-12-08 11:38:43 +01:00
ulteq
45aa80bed7 Fix leg damage always counted as #vehiclecrash 2016-12-07 16:39:22 +01:00
ulteq
a5ce5b4a34 Medical Rewrite - Continued (#4744) 2016-12-05 21:34:20 +01:00
commy2
347be3c222 handle vehicle crashes and add wounds for fall damage 2016-10-20 15:02:24 +02:00
commy2
0370a34672 remove some debug 2016-10-20 12:43:57 +02:00
commy2
f2dfc6dc0e fixes, tweaks 2016-10-13 20:17:21 +02:00
commy2
5965326ca1 merge basic and adv. bandage actions 2016-10-13 09:47:52 +02:00
commy2
fd6e46b622 make waking up rocket soldier kneel not stand 2016-10-13 01:42:32 +02:00
commy2
e38845bf45 add ace_kill event handler 2016-10-12 23:20:22 +02:00
commy2
a5d070f829 blood and unconsciousness fixes 2016-10-12 21:59:32 +02:00