Commit Graph

37 Commits

Author SHA1 Message Date
GhostIsSpooky
5b89daf277
fix CPR treatment condition (#8762) 2022-01-31 13:40:03 -06:00
Neviothr
75f7ed7532
Utilize isNotEqualTo (#7929)
* Utilize isNotEqualTo

* undo changes to some files

* redo some changes, fix based on @Vdauphin 's comment

* fix validator issues

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2021-02-27 11:05:05 -06:00
BaerMitUmlaut
0c84cdd375
Fix unconscious medics not being healed by other AI medics (#7995) 2020-11-08 16:32:02 -06:00
BaerMitUmlaut
b389740a29
Medical AI - Fix AI healing itself too fast when hit (#7955)
* Fix AI healing itself too fast when hit

* make time constants gvars

Co-authored-by: PabstMirror <pabstmirror@gmail.com>
2020-10-29 11:38:24 -05:00
PabstMirror
2feeec0d7f
Medical AI - Block healing when handcuffed (#7493) 2020-01-28 19:12:38 -06:00
LachlanSneddon
e8fcbcdf4b Medical AI - Improve Healing Logic (#7255)
* Improve AI healing logic

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Added event for CPR chance being 0

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

Co-Authored-By: mharis001 <34453221+mharis001@users.noreply.github.com>

* Update addons/medical_ai/functions/fnc_healingLogic.sqf

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

* Update fnc_healingLogic.sqf

Co-Authored-By: commy2 <commy2@users.noreply.github.com>
2019-12-14 12:04:09 -06:00
PabstMirror
05e4f74e73
Medical AI - Adjust healing logic for rewrite (#6902)
* Medical AI - Adjust healing logic for rewrite

- move state machine from config to sqf
- move all healing logic to seperate func
- attempt to handle healing for new system

* prioritize unitReady medics

* move setting to subcategory under medical

* Use faster GET_WOUND_BLEEDING

* Update fnc_healingLogic.sqf

* Update for wound array changes

* Update treatment events changes

* Fractures/splint

* formating / use GET_OPEN_WOUNDS

* Use non-localized medical category
2019-07-03 09:59:28 -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
Magnetar
89927a8b94 Missing privates. Lazy evaluation. 2019-03-17 21:26:15 +01:00
Magnetar
bb2d1e4e9e Merge branch 'master' into medical-rewrite 2019-03-17 17:39:43 +01:00
Dedmen Miller
e2ac18a05d [WIP] Fix script errors reporting wrong line numbers (#6407)
* advanced_ballistics

* advanced_fatigue

* advanced_throwing

* ai

* aircraft

* arsenal

* atragmx

* attach

* backpacks

* ballistics

* captives

* cargo

* chemlights

* common

* concertina_wire

* cookoff

* dagr

* disarming

* disposable

* dogtags

* dragging

* explosives

* fastroping

* fcs

* finger

* frag

* gestures

* gforces

* goggles

* grenades

* gunbag

* hearing

* hitreactions

* huntir

* interact_menu

* interaction

* inventory

* kestrel4500

* laser

* laserpointer

* logistics_uavbattery

* logistics_wirecutter

* magazinerepack

* map

* map_gestures

* maptools

* markers

* medical

* medical_ai

* medical_blood

* medical_menu

* microdagr

* minedetector

* missileguidance

* missionmodules

* mk6mortar

* modules

* movement

* nametags

* nightvision

* nlaw

* optics

* optionsmenu

* overheating

* overpressure

* parachute

* pylons

* quickmount

* rangecard

* rearm

* recoil

* refuel

* reload

* reloadlaunchers

* repair

* respawn

* safemode

* sandbag

* scopes

* slideshow

* spectator

* spottingscope

* switchunits

* tacticalladder

* tagging

* trenches

* tripod

* ui

* vector

* vehiclelock

* vehicles

* viewdistance

* weaponselect

* weather

* winddeflection

* yardage450

* zeus

* arsenal defines.hpp

* optionals

* DEBUG_MODE_FULL 1

* DEBUG_MODE_FULL 2

* Manual fixes

* Add SQF Validator check for #include after block comment

* explosives fnc_openTimerUI

* fix uniqueItems
2018-09-17 14:19:29 -05: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
68ff7575eb
Move medical facility, vehicle and unit functions (#6440) 2018-07-18 11:09:48 +01:00
SilentSpike
ff33f8e954 Use macro for unconscious variable 2018-05-22 17:21:24 +01:00
SilentSpike
1dc934e1b1 Use macros for unit variables
Improves the way medical is storing variables in object space by having
a common list of variables names as macros. Makes the code a bit cleaner
and ensured consistency across components. Also a handy reference for
when working on medical to see what values are all stored.
2018-05-11 15:28:25 +01:00
SilentSpike
697aa5dc08 Fix medical status function calls 2018-05-08 10:45:30 +01:00
SilentSpike
c92fd89c7a Fix pain percieved function calls 2018-05-08 08:47:03 +01:00
SilentSpike
6559665b8b Use more status macros 2018-04-27 16:03:55 +01:00
ulteq
5ee1df424d
Minor performance tweaks (#5796)
* Medical_ai - Optimize 'fnc_isInjured'
* Laserpointer - Optimize 'fnc_onDraw'
* Overheating - Skip ground detection if possible
* Overheating - Replace function call with inline code
* Overheating - Nest 'firedEH' abort conditions
* Overheating - Remove duplicate code / Skip function call if possible
* Overheating - Cache energy increment
2017-11-23 11:13:58 +01:00
PabstMirror
5c4dbdcbda Merge branch 'master' into medical-rewrite
Conflicts:
	addons/medical/ACE_Settings.hpp
	addons/medical/XEH_postInit.sqf
	addons/medical/functions/fnc_adjustPainLevel.sqf
	addons/medical/functions/fnc_copyDeadBody.sqf
	addons/medical/functions/fnc_getTriageStatus.sqf
	addons/medical/functions/fnc_handleBandageOpening.sqf
	addons/medical/functions/fnc_handleCollisionDamage.sqf
	addons/medical/functions/fnc_handleDamage_fractures.sqf
	addons/medical/functions/fnc_handleDamage_woundsOld.sqf
	addons/medical/functions/fnc_init.sqf
	addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf
	addons/medical/functions/fnc_parseConfigForInjuries.sqf
	addons/medical/functions/fnc_setDead.sqf
	addons/medical/functions/fnc_setHitPointDamage.sqf
	addons/medical/functions/fnc_setUnconscious.sqf
	addons/medical/functions/fnc_showBloodEffect.sqf
	addons/medical/functions/fnc_unconsciousPFH.sqf
	addons/medical/stringtable.xml
	addons/medical_ai/functions/fnc_healUnit.sqf
	addons/medical_ai/functions/fnc_isInjured.sqf
	addons/medical_menu/functions/fnc_handleUI_DisplayOptions.sqf
2017-10-24 16:13:12 -05:00
LordGolias
8d9c17ed88 Made AI medic use epipen on unconscious patients (#5433)
* Made AI medic use epipen on unconscious patients

* Fix epi heal args, use non-local treatment funcs
2017-10-14 20:43:53 +02:00
PabstMirror
356a8f640a Merge branch 'master' into medical-rewrite
Conflicts:
	addons/medical/functions/fnc_actionCheckBloodPressure.sqf
	addons/medical/functions/fnc_actionCheckBloodPressureLocal.sqf
	addons/medical/functions/fnc_actionCheckPulse.sqf
	addons/medical/functions/fnc_actionCheckPulseLocal.sqf
	addons/medical/functions/fnc_actionDiagnose.sqf
	addons/medical/functions/fnc_actionRemoveTourniquet.sqf
	addons/medical/functions/fnc_addHeartRateAdjustment.sqf
	addons/medical/functions/fnc_addToInjuredCollection.sqf
	addons/medical/functions/fnc_addUnconsciousCondition.sqf
	addons/medical/functions/fnc_addVitalLoop.sqf
	addons/medical/functions/fnc_canTreat.sqf
	addons/medical/functions/fnc_copyDeadBody.sqf
	addons/medical/functions/fnc_createLitter.sqf
	addons/medical/functions/fnc_determineIfFatal.sqf
	addons/medical/functions/fnc_getBloodLoss.sqf
	addons/medical/functions/fnc_getBloodPressure.sqf
	addons/medical/functions/fnc_getBloodVolumeChange.sqf
	addons/medical/functions/fnc_getCardiacOutput.sqf
	addons/medical/functions/fnc_getHeartRateChange.sqf
	addons/medical/functions/fnc_getTriageStatus.sqf
	addons/medical/functions/fnc_getUnconsciousCondition.sqf
	addons/medical/functions/fnc_handleBandageOpening.sqf
	addons/medical/functions/fnc_handleCollisionDamage.sqf
	addons/medical/functions/fnc_handleDamage.sqf
	addons/medical/functions/fnc_handleDamage_advanced.sqf
	addons/medical/functions/fnc_handleDamage_advancedSetDamage.sqf
	addons/medical/functions/fnc_handleDamage_airway.sqf
	addons/medical/functions/fnc_handleDamage_caching.sqf
	addons/medical/functions/fnc_handleDamage_fractures.sqf
	addons/medical/functions/fnc_handleDamage_internalInjuries.sqf
	addons/medical/functions/fnc_handleDamage_wounds.sqf
	addons/medical/functions/fnc_handleDamage_woundsOld.sqf
	addons/medical/functions/fnc_hasMedicalEnabled.sqf
	addons/medical/functions/fnc_hasTourniquetAppliedTo.sqf
	addons/medical/functions/fnc_isInStableCondition.sqf
	addons/medical/functions/fnc_isMedicalVehicle.sqf
	addons/medical/functions/fnc_itemCheck.sqf
	addons/medical/functions/fnc_medicationEffectLoop.sqf
	addons/medical/functions/fnc_modifyMedicalAction.sqf
	addons/medical/functions/fnc_moduleAdvancedMedicalSettings.sqf
	addons/medical/functions/fnc_moduleAssignMedicalFacility.sqf
	addons/medical/functions/fnc_moduleBasicMedicalSettings.sqf
	addons/medical/functions/fnc_moduleReviveSettings.sqf
	addons/medical/functions/fnc_parseConfigForInjuries.sqf
	addons/medical/functions/fnc_playInjuredSound.sqf
	addons/medical/functions/fnc_reviveStateLoop.sqf
	addons/medical/functions/fnc_selectionNameToNumber.sqf
	addons/medical/functions/fnc_setDead.sqf
	addons/medical/functions/fnc_setHitPointDamage.sqf
	addons/medical/functions/fnc_setStructuralDamage.sqf
	addons/medical/functions/fnc_setUnconscious.sqf
	addons/medical/functions/fnc_showBloodEffect.sqf
	addons/medical/functions/fnc_treatment.sqf
	addons/medical/functions/fnc_treatmentAdvanced_CPR.sqf
	addons/medical/functions/fnc_treatmentAdvanced_CPRLocal.sqf
	addons/medical/functions/fnc_treatmentAdvanced_bandage.sqf
	addons/medical/functions/fnc_treatmentAdvanced_bandageLocal.sqf
	addons/medical/functions/fnc_treatmentAdvanced_fullHeal.sqf
	addons/medical/functions/fnc_treatmentAdvanced_fullHealLocal.sqf
	addons/medical/functions/fnc_treatmentAdvanced_medication.sqf
	addons/medical/functions/fnc_treatmentAdvanced_medicationLocal.sqf
	addons/medical/functions/fnc_treatmentBasic_bloodbag.sqf
	addons/medical/functions/fnc_treatmentBasic_bloodbagLocal.sqf
	addons/medical/functions/fnc_treatmentBasic_epipen.sqf
	addons/medical/functions/fnc_treatmentBasic_morphine.sqf
	addons/medical/functions/fnc_treatmentBasic_morphineLocal.sqf
	addons/medical/functions/fnc_treatmentIV.sqf
	addons/medical/functions/fnc_treatmentIVLocal.sqf
	addons/medical/functions/fnc_treatmentTourniquet.sqf
	addons/medical/functions/fnc_treatmentTourniquetLocal.sqf
	addons/medical/functions/fnc_treatment_failure.sqf
	addons/medical/functions/fnc_treatment_success.sqf
	addons/medical/functions/fnc_unconsciousPFH.sqf
	addons/medical/functions/fnc_useItem.sqf
	addons/medical/functions/fnc_vitalLoop.sqf
	addons/medical_blood/functions/fnc_hit.sqf
	addons/medical_treatment/functions/fnc_hasItem.sqf
	addons/medical_treatment/functions/fnc_useItems.sqf
2017-06-10 10:21:18 -05:00
Phyma
ffaa195fe5 Conform function headers to coding guidelines (#5255)
* Fixed headers to work with silentspike python script

* Fixed rest of the files

* Fixed ace-team
2017-06-08 15:31:51 +02:00
PabstMirror
a32478adfb Merge branch 'master' into medical-rewrite 2017-01-17 13:10:18 -06:00
Skully71
9b22f94374 Ensure movingToInjured is false whenever _target no longer needs healing, fixes #4797 (#4800) 2017-01-02 14:02:43 +01:00
PabstMirror
c2f9010183 opps 2016-12-09 21:29:23 -06:00
PabstMirror
3907d2dc9f Cleanup moved functions 2016-12-09 21:27:42 -06:00
ulteq
fa77fb7194 Various fixes:
* Fixed medication (morphine, epinephrine, ...)
* Fixed CPR
* Improved heart rate simulation
* Removed deprecated ace settings
2016-12-06 17:26:11 +01:00
commy2
a83267b2ff manual merge 2016-12-05 20:15:16 +01:00
PabstMirror
0746264905 MedicalAI - Fix treatment animion with no weapon (#4633) 2016-11-04 00:01:58 +01:00
commy2
4a06d19ce4 merge basic and adv. bandage actions 2016-10-13 01:55:10 +02:00
commy2
5613ec5d5a treatment functions and unconsciousness rework 2016-10-06 00:54:57 +02:00
PabstMirror
60a7490b7e Fix some moved funcs/strings 2016-09-29 15:08:36 -05:00
BaerMitUmlaut
b1f6973772 Filter player medics (#4444) 2016-09-20 16:01:54 +02:00
BaerMitUmlaut
1601f6a7b7 Disable medical AI for remote controlled AI 2016-09-12 17:06:14 +02:00
BaerMitUmlaut
278e7fa800 Add Medical AI implementation for basic medical (#4311)
* Initial commit medical AI

* Finished non-healing functions

* Initial work on self healin

* AI healing

* Finished medical AI for basic medical

* Finito

* Fix for dead units, medic not being close enough

* Make ace_medical required

* Fixed double systemChat

* Made AI units able to heal players

* Fixed wound treatment

* Fixed medic movement

* Made units heal themselves earlier
2016-09-04 11:25:03 +02:00