Commit Graph

12673 Commits

Author SHA1 Message Date
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
5fbaf426a8 Fix various bugs (#6523)
* Fix medical menu not reopening regardless of setting
* Ensure no heartrate or bloodpressure on death
* Fix status variables not being reset on respawn
* Fix JIP resetting status variables for all units
* Fix heart rate adjustment overflow and
2018-08-14 21:34:35 +01:00
0e8ed5315e Remove patient treatment animations (#6524)
* Prevent treatment animation on dead bodies

This was causing bodies to glitch out on dedicated servers according to
feedback

* Remove patient animation logic and setting
2018-08-12 12:28:48 +01:00
a182336880 Ignore playable logic hitpoints (#6517) 2018-08-12 12:21:06 +01:00
923c25163f Fix missing boolean return in CPR 2018-08-12 11:50:47 +01:00
7fcd12c792 Reset default state on respawn (#6518)
* Reset default state on respawn
* Remove old getUnitState function
* Add locality check
2018-08-12 10:14:48 +01:00
14d52ee77e Remove CPR alive check (#6492) 2018-08-12 08:57:23 +01:00
c1c5d6d63c Remove collision of bandage litter (#6495)
* Remove littergeneric collision
* Remove collision/shadow from non-litter items
* Remove quik clot litter shadow
* Add empty shadowLOD to litter
2018-08-11 17:52:26 +01:00
0a97ef3cc8 Fix event name overlap and macros (#6514) 2018-08-11 11:40:06 +01:00
88238dd0b5 Fix wrong macro (#6509) 2018-08-08 09:54:17 +01:00
9e5c4a7ed9 Move medical settings into their respective components (#6493)
* Transfer medical AI to CBA setting
* Neuter the old settings module

I've left the entry in CfgVehicles so that it doesn't cause errors on
older missions, but it's just a dumb logic now and does nothing.

* Remove medic setting
* Move increaseTraining setting
* Move fnc_adjustPainlevel to medical_status
* Move pain and bleed coefficients to medical_status
* Move advanced bandages to medical_treatment
* Move advanced medication to medical_treatment
* Move advanced diagnose to medical_treatment
* Move wound reopening and screams settings
* Move damage threshold settings
* Move showPain setting
* Move statemachine settings
* Move pain visualisation setting
* Move all treatment usage settings
* Move self IV setting
* Move remaining settings
* Sort treatment setting string categories
2018-08-06 17:08:43 +01:00
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
60a8158246 Fix GUI bodypart string names (#6490)
* Fixed new names in stringtable
* Removed duplicated entries from stringtable
* Fixed comma
2018-08-02 09:43:30 +01:00
7cf483d598 Removed icon from legacy modules (#6486) 2018-07-30 14:11:18 -05:00
6bd8542eed Move #includes before function headers (#6484) 2018-07-30 10:22:14 +01:00
c9ad92e92d Disable debugging (#6482) 2018-07-30 00:07:30 +02:00
36f2c5fcc9 Minor code clean up (#6474)
* Minor code clean up
* refactor(medical): shorten some code
* refactor(medical): use macros for tourniquets
* refactor(medical): pull cache expiry values into script_macros_medical
2018-07-29 22:43:14 +01:00
9e26833b94 fix(medical): make sure vitals handling works properly again (#6481) 2018-07-29 23:16:06 +02:00
2ea7c349ca Add possibility for lethal organ damage (#6277)
* Change fatal injury to emulate lethal organ damage
2018-07-29 21:19:04 +01:00
e22f35da37 Remove medkit (#6473)
Due to be replaced by an alternative treatment option such as a split
2018-07-26 17:14:11 +01:00
9349179213 Fix and use hemorrhage stringtable descriptions (#6472)
* Fix hemorrhage stringtable descriptions
* Use hemorrhage descriptions always
2018-07-25 18:42:53 +01:00
873ed90cc1 Introduce bleedout condition and fix IV hemorrhage (#6470)
* Introduce bleedout condition and fix IV hemorrhage
* Update patient info display hemorrhage values
* Update UI info hemorrhage values
2018-07-25 11:40:37 +01:00
39b1d144e1 Vary time taken to bandage based on circumstances (#6467) 2018-07-25 09:35:04 +01:00
78ee7d4677 simplify animations config 2018-07-21 09:16:05 +02:00
3b5747423a Improve unconscious volume handling (#6455)
* Lower player hearing upon entering unconscious
* Fix potential for unconscious units to use radio
* Evaluate player's volume upon changing unit
* Reset player volume on death
* Remove unnecessary public variable
2018-07-20 22:23:48 +01:00
b8cd85135e Changes unit vitals rw (#6449)
* Some changes to UnitVitals

* increase to 40% chance

* Added bloodpressure L above limits cardiac arrest
2018-07-20 22:49:55 +02:00
cde22a675a Fix ladder dismount animation bug (#6454)
Not sure of the original reason we interpolate to this ACE unconscious
animation, but removing it seemingly has no effect and fixes all the
other animations that were broken by it.
2018-07-20 22:48:48 +02:00
f7f89725fe Fix respawn not resetting variables (#6453) 2018-07-20 00:09:08 +02:00
ac5fedff44 Fix cardiac arrest timeout death (#6451) 2018-07-19 19:12:59 +02:00
13cdb76dce Fix some more stringtable usage 2018-07-18 23:20:31 +02:00
245a18599e Fix stringtable references 2018-07-18 23:19:27 +02:00
259afc169b Line endings 2018-07-18 22:51:53 +02:00
604fa0e4cb Fix some script errors on medical rewrite (#6450) 2018-07-18 22:50:03 +02:00
6497f6c9d4 Fix missing include 2018-07-18 21:17:44 +01:00
5c768f7784 Fix duplicate entry (#6448) 2018-07-18 21:53:54 +02:00
3054803e44 Improvements to vitals and display (#6444)
- Improvements to vitals and display
- Fixes some undeclared variables
- Adds advanced diagnose: hemorrhage classes.
- Original idea for displaying hemorrhage classes belongs to @Arcanum417
2018-07-18 21:38:00 +02:00
e8f00fbe7c Merge remote-tracking branch 'origin/master' into medical-rewrite 2018-07-18 20:42:41 +02:00
0e50aca9d8 Add support to toggle allowDamage (#6266) 2018-07-18 19:31:29 +01:00
3bbc1d21e4 Merge pull request #6301 from acemod/medical-rewrite-restructure
Restructure medical rewrite
2018-07-18 20:25:02 +02:00
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
ec7a9a133e Fix required addons in medical restructure (#6441) 2018-07-18 19:19:28 +01:00
4466f9e785 Strip medical component (#6442)
* Move litter to `treatment`
* Move eden object attributes to `treatment`
* Move treatment items to `treatment`
* Move bodybag handling to `treatment`
* Move state conditions to `statemachine`
* Move radio addon handling to `feedback`
* Move medical macros to `engine`
* Move medical extension to `damage`
* Fix texture and material paths after move
* Remove duplicate medical menu config
* Remove old faction class
* Remove a bunch of old code
2018-07-18 19:13:25 +01:00
68ff7575eb Move medical facility, vehicle and unit functions (#6440) 2018-07-18 11:09:48 +01:00
c9c8d25017 Move vitals loop statemachine events into switch statement (#6443)
- Induce cardiac arrest if unit blood volume drops below half
2018-07-18 11:09:09 +01:00
bf4f54bce6 Fix settings in medical rewrite (#6436)
* Fix settings in medical rewrite
* Raise spontaneousWakeUpChance to 0.05
2018-07-17 15:49:14 +01:00
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
3bf3629047 Fixes state machine (#6435) 2018-07-16 23:25:54 +02:00
9b5c5bc866 Fix QGVAR medical variables 2018-07-16 15:35:34 +02:00
81f1365a41 Merge pull request #6434 from acemod/fix-restructure
Various fixes for the medical restructure branch
2018-07-16 12:34:39 +02:00
e23d1cfe17 Add run deploy job on master branch 2018-07-15 18:31:00 +02:00