From fe0eac7896a7411bf75269056cb856ba0707f9b3 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 18:17:26 +0100 Subject: [PATCH 1/8] First port of AGM's visual loop. --- addons/medical/XEH_postInit.sqf | 124 +++++++++++++++++++++++++++++--- 1 file changed, 116 insertions(+), 8 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 116809b26f..fe160ef643 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -1,23 +1,131 @@ +// ACE Medical System Visual Loop #include "script_component.hpp" if (!hasInterface) exitwith{}; -//45 cutRsc [QGVAR(ScreenEffectsBlack),"PLAIN"]; GVAR(heartBeatSounds_Fast) = ["ACE_heartbeat_fast_1", "ACE_heartbeat_fast_2", "ACE_heartbeat_fast_3", "ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Normal) = ["ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; GVAR(heartBeatSounds_Slow) = ["ACE_heartbeat_slow_1", "ACE_heartbeat_slow_2", "ACE_heartbeat_norm_1", "ACE_heartbeat_norm_2"]; - GVAR(playingHeartBeatSound) = false; -GVAR(effect_BloodLevel_CC) = ppEffectCreate ["ColorCorrections", 4208]; -GVAR(effect_BloodLevel_CC) ppEffectForceInNVG true; -GVAR(effect_BloodLevel_CC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,1], [0.2,0.2,0.2,0]]; -GVAR(effect_BloodLevel_CC) ppEffectCommit 0; +// Initialize all effects +// @todo: make this a macro? +_fnc_createEffect = { + private ["_type", "_layer", "_default"]; + _type = _this select 0; + _layer = _this select 1; + _default = _this select 2; + + _effect = ppEffectCreate [_type, _layer]; + _effect ppEffectForceInNVG true; + _effect ppEffectAdjust _default; + _effect ppEffectCommit 0; + + _effect +}; + +GVAR(effectUnconsciousCC) = [ + "ColorCorrections", + 4201, + [1,1,0, [0,0,0,1], [0,0,0,0], [1,1,1,1], [0.4,0.4,0,0,0,0.1,0.3]] +] call _fnc_createEffect; +GVAR(effectUnconsciousRB) = [ + "RadialBlur", + 4202, + [0.01,0.01,0,0] +] call _fnc_createEffect; + +GVAR(effectBlindingCC) = [ + "ColorCorrections", + 4203, + [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]] +] call _fnc_createEffect; + +GVAR(effectBloodVolumeCC) = [ + "ColorCorrections", + 4204, + [1,1,0, [0,0,0,0], [1,1,1,1], [0.2,0.2,0.2,0]] +] call _fnc_createEffect; + +GVAR(effectPainCA) = [ + "chromAberration", + 4205, + [0, 0, false] +] call _fnc_createEffect; +GVAR(effectPainCC) = [ + "ColorCorrections", + 4206, + [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1.3,1.3,0,0,0,0.2,2]] +] call _fnc_createEffect; + +// @todo; what's this for? GVAR(effectUnconsciousUnit) = objNull; +// Initialize Other Variables +GVAR(effectBlind) = false; +GVAR(effectTimeBlood) = time; + // TODO add settings to allow modification of what is being displayed. [{ + // Zeus interface is open; disable everything + if (!isNull (findDisplay 312)) exitWith { + GVAR(effectUnconsciousCC) ppEffectEnable false; + GVAR(effectUnconsciousRB) ppEffectEnable false; + GVAR(effectBlindingCC) ppEffectEnable false; + GVAR(effectBloodVolumeCC) ppEffectEnable false; + GVAR(effectPainCA) ppEffectEnable false; + GVAR(effectPainCC) ppEffectEnable false; + }; + + // Player is dead; disable everything and reenable input + if (!alive ACE_player) exitWith { + GVAR(effectUnconsciousCC) ppEffectEnable false; + GVAR(effectUnconsciousRB) ppEffectEnable false; + GVAR(effectBlindingCC) ppEffectEnable false; + GVAR(effectBloodVolumeCC) ppEffectEnable false; + GVAR(effectPainCA) ppEffectEnable false; + GVAR(effectPainCC) ppEffectEnable false; + [false] call EFUNC(common,disableUserInput); // @todo, only when disabled? + }; + + // @todo: merge the above? + + // Unconsciousness effect + if (ACE_player getVariable [QGVAR(isUnconscious), false]) then { + GVAR(effectUnconsciousCC) ppEffectEnable true; + GVAR(effectUnconsciousRB) ppEffectEnable true; + GVAR(effectBlind) = true; + [true, true] call EFUNC(common,disableUserInput); // @todo, see above + } else { + GVAR(effectUnconsciousCC) ppEffectEnable false; + GVAR(effectUnconsciousRB) ppEffectEnable false; + [false] call EFUNC(common,disableUserInput); // @todo, see above + if (GVAR(effectBlind)) then { + // @todo: blinding effect on wakeup + }; + }; + + // @todo: pain effect + + // Bleeding Indicator + // @todo: redo this after initial release + if (damage ACE_player > 0.1 and GVAR(effectTimeBlood) + 6 < time) then { + GVAR(effectTimeBlood) = time; + [500 * damage ACE_player] call BIS_fnc_bloodEffect; + }; + + // Blood Volume Effect + _blood = AGM_player getVariable ["AGM_Blood", 100] / 100; + if (_blood > 0.99) then { + GVAR(effectBloodVolumeCC) ppEffectEnable false; + } else { + GVAR(effectBloodVolumeCC) ppEffectEnable true; + GVAR(effectBloodVolumeCC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,_blood], [0.2,0.2,0.2,0]]; + GVAR(effectBloodVolumeCC) ppEffectCommit 0; + }; + +/* private ["_unit","_bloodLoss", "_bloodVolume"]; _unit = ACE_player; @@ -97,5 +205,5 @@ GVAR(effectUnconsciousUnit) = objNull; [true] call EFUNC(common,setVolume_f); }; }; - - }, 0.5, [] ] call CBA_fnc_addPerFrameHandler; +*/ +}, 0.5, [] ] call CBA_fnc_addPerFrameHandler; From 4ec19429ae93e7f538e042171b21adf215e51bc4 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:13:14 +0100 Subject: [PATCH 2/8] Fix initial value of bloodVolume --- addons/medical/functions/fnc_init.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/functions/fnc_init.sqf b/addons/medical/functions/fnc_init.sqf index 49d7d15f13..9bff83005c 100644 --- a/addons/medical/functions/fnc_init.sqf +++ b/addons/medical/functions/fnc_init.sqf @@ -19,4 +19,4 @@ _unit = _this select 0; _unit setVariable [QGVAR(pain), 0, true]; _unit setVariable [QGVAR(morphine), 0, true]; -_unit setVariable [QGVAR(bloodVolume), 1, true]; +_unit setVariable [QGVAR(bloodVolume), 100, true]; From faa7e1fb6326121e3e28fbd0fcb33ab23cc74c82 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:13:52 +0100 Subject: [PATCH 3/8] Merge alive and Zeus conditions --- addons/medical/XEH_postInit.sqf | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index fe160ef643..35549f6853 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -30,6 +30,7 @@ GVAR(effectUnconsciousCC) = [ 4201, [1,1,0, [0,0,0,1], [0,0,0,0], [1,1,1,1], [0.4,0.4,0,0,0,0.1,0.3]] ] call _fnc_createEffect; + GVAR(effectUnconsciousRB) = [ "RadialBlur", 4202, @@ -53,6 +54,7 @@ GVAR(effectPainCA) = [ 4205, [0, 0, false] ] call _fnc_createEffect; + GVAR(effectPainCC) = [ "ColorCorrections", 4206, @@ -66,20 +68,9 @@ GVAR(effectUnconsciousUnit) = objNull; GVAR(effectBlind) = false; GVAR(effectTimeBlood) = time; -// TODO add settings to allow modification of what is being displayed. [{ - // Zeus interface is open; disable everything - if (!isNull (findDisplay 312)) exitWith { - GVAR(effectUnconsciousCC) ppEffectEnable false; - GVAR(effectUnconsciousRB) ppEffectEnable false; - GVAR(effectBlindingCC) ppEffectEnable false; - GVAR(effectBloodVolumeCC) ppEffectEnable false; - GVAR(effectPainCA) ppEffectEnable false; - GVAR(effectPainCC) ppEffectEnable false; - }; - - // Player is dead; disable everything and reenable input - if (!alive ACE_player) exitWith { + // Zeus interface is open or player is dead; disable everything + if (!(isNull (findDisplay 312)) or !(alive ACE_player)) exitWith { GVAR(effectUnconsciousCC) ppEffectEnable false; GVAR(effectUnconsciousRB) ppEffectEnable false; GVAR(effectBlindingCC) ppEffectEnable false; @@ -89,8 +80,6 @@ GVAR(effectTimeBlood) = time; [false] call EFUNC(common,disableUserInput); // @todo, only when disabled? }; - // @todo: merge the above? - // Unconsciousness effect if (ACE_player getVariable [QGVAR(isUnconscious), false]) then { GVAR(effectUnconsciousCC) ppEffectEnable true; From 28dbd857c2d81622fdf19c56469bb61fc5d04906 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:14:11 +0100 Subject: [PATCH 4/8] Fix generic error --- addons/medical/XEH_postInit.sqf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 35549f6853..9d060aa745 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -105,7 +105,7 @@ GVAR(effectTimeBlood) = time; }; // Blood Volume Effect - _blood = AGM_player getVariable ["AGM_Blood", 100] / 100; + _blood = (ACE_player getVariable [QGVAR(bloodVolume), 100]) / 100; if (_blood > 0.99) then { GVAR(effectBloodVolumeCC) ppEffectEnable false; } else { From 675b89f360eb2ab495d98cc337058e394eb90696 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:14:39 +0100 Subject: [PATCH 5/8] Add blinding effect to wakeup --- addons/medical/XEH_postInit.sqf | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 9d060aa745..30e3ba6b22 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -91,7 +91,21 @@ GVAR(effectTimeBlood) = time; GVAR(effectUnconsciousRB) ppEffectEnable false; [false] call EFUNC(common,disableUserInput); // @todo, see above if (GVAR(effectBlind)) then { - // @todo: blinding effect on wakeup + _strength = 0.78 * (call EFUNC(common,ambientBrightness)); + GVAR(effectBlindingCC) ppEffectEnable true; + GVAR(effectBlindingCC) ppEffectAdjust [1,1,_strength, [1,1,1,0], [0,0,0,1], [0,0,0,0]]; + GVAR(effectBlindingCC) ppEffectCommit 0; + + [{ + GVAR(effectBlindingCC) ppEffectAdjust [1,1,0, [1,1,1,0], [0,0,0,1], [0,0,0,0]]; + GVAR(effectBlindingCC) ppEffectCommit ((_this select 0) * 2); + }, [_strength], 0.01, 0] call EFUNC(common,waitAndExecute); + + [{ + GVAR(effectBlindingCC) ppEffectEnable false; + }, [], (_strength * 2) + 0.5, 0] call EFUNC(common,waitAndExecute); + + GVAR(effectBlind) = false; }; }; From 89a505ea4458f4b787f1ec196449963531f3c314 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Tue, 10 Feb 2015 23:14:56 +0100 Subject: [PATCH 6/8] Remove old effects code --- addons/medical/XEH_postInit.sqf | 99 +++++++-------------------------- 1 file changed, 21 insertions(+), 78 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 30e3ba6b22..87dc9be80c 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -127,86 +127,29 @@ GVAR(effectTimeBlood) = time; GVAR(effectBloodVolumeCC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,_blood], [0.2,0.2,0.2,0]]; GVAR(effectBloodVolumeCC) ppEffectCommit 0; }; - -/* - private ["_unit","_bloodLoss", "_bloodVolume"]; - _unit = ACE_player; - if (isNull(findDisplay 312) && alive _unit) then { - if ([_unit] call EFUNC(common,isAwake)) then { - _bloodLoss = _unit call FUNC(getBloodLoss); - if (_bloodLoss >0) then { - _time = 10 - _bloodLoss; - if (_time < 1.5) then { - _time = 1.5; - }; - if (time - (missionNamespace getvariable [QGVAR(displayedBleedingEffectMoment), -10])) then { - missionNamespace setvariable [QGVAR(displayedBleedingEffectMoment), time]; - - // call bleeding effect - }; - }; - - // Heart rate sound effect - _heartRate = _unit getvariable[QGVAR(heartRate), 70]; - if (_heartRate > 0.1) then { - if (GVAR(playingHeartBeatSound)) exitwith {}; - GVAR(playingHeartBeatSound) = true; - _sleep = 60 / _heartRate; - if (_heartRate < 60) then { - _sound = GVAR(heartBeatSounds_Slow) select (random((count GVAR(heartBeatSounds_Slow)) -1)); - playSound _sound; - [{ - GVAR(playingHeartBeatSound) = false; - }, [], _sleep, _sleep] call EFUNC(common,waitAndExecute); - } else { - if (_heartRate > 120) then { - _sound = GVAR(heartBeatSounds_Fast) select (random((count GVAR(heartBeatSounds_Fast)) -1)); - playSound _sound; - [{ - GVAR(playingHeartBeatSound) = false; - }, [], _sleep, _sleep] call EFUNC(common,waitAndExecute); - }; - }; - }; - - // TODO implement a new pain effect. - }; - if (_unit getvariable ["ACE_isUnconscious", false] && GVAR(effectUnconsciousUnit) != _unit) then { - GVAR(effectUnconsciousUnit) = _unit; - - // handle the unconscious effects. - [] call EFUNC(common,closeAllDialogs_f); - //[true] call FUNC(effectBlackOut); - ["unconscious", true] call EFUNC(common,setDisableUserInputStatus); - [false] call EFUNC(common,setVolume_f); + /* @todo + // Heart rate sound effect + _heartRate = _unit getvariable[QGVAR(heartRate), 70]; + if (_heartRate > 0.1) then { + if (GVAR(playingHeartBeatSound)) exitwith {}; + GVAR(playingHeartBeatSound) = true; + _sleep = 60 / _heartRate; + if (_heartRate < 60) then { + _sound = GVAR(heartBeatSounds_Slow) select (random((count GVAR(heartBeatSounds_Slow)) -1)); + playSound _sound; + [{ + GVAR(playingHeartBeatSound) = false; + }, [], _sleep, _sleep] call EFUNC(common,waitAndExecute); } else { - if (GVAR(effectUnconsciousUnit) == _unit) then { - GVAR(effectUnconsciousUnit) = ObjNull; - - //[false] call FUNC(effectBlackOut); - ["unconscious", false] call EFUNC(common,setDisableUserInputStatus); - [true] call EFUNC(common,setVolume_f); + if (_heartRate > 120) then { + _sound = GVAR(heartBeatSounds_Fast) select (random((count GVAR(heartBeatSounds_Fast)) -1)); + playSound _sound; + [{ + GVAR(playingHeartBeatSound) = false; + }, [], _sleep, _sleep] call EFUNC(common,waitAndExecute); }; }; - - // Blood volume grayscale Effect - _bloodVolume = _unit getVariable [QGVAR(bloodVolume), 100]; - if (_bloodVolume > 99 || !alive _unit) then { - GVAR(effect_BloodLevel_CC) ppEffectEnable false; - } else { - GVAR(effect_BloodLevel_CC) ppEffectEnable true; - GVAR(effect_BloodLevel_CC) ppEffectAdjust [1, 1, 0, [0.0, 0.0, 0.0, 0.0], [1, 1, 1,_bloodVolume/100], [0.2, 0.2, 0.2, 0]]; - GVAR(effect_BloodLevel_CC) ppEffectCommit 0; - }; - } else { - GVAR(effect_BloodLevel_CC) ppEffectEnable false; - if (!isNull GVAR(effectUnconsciousUnit)) then { - GVAR(effectUnconsciousUnit) = ObjNull; - //[false] call FUNC(effectBlackOut); - ["unconscious", false] call EFUNC(common,setDisableUserInputStatus); - [true] call EFUNC(common,setVolume_f); - }; }; -*/ -}, 0.5, [] ] call CBA_fnc_addPerFrameHandler; + */ +}, 0.5, []] call CBA_fnc_addPerFrameHandler; From 58873e1c9770c62dc9aac8198fe359e128ab4f18 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Wed, 18 Feb 2015 19:01:25 +0100 Subject: [PATCH 7/8] Pain Effect --- addons/medical/XEH_postInit.sqf | 74 ++++++++++++++++++- addons/medical/functions/fnc_handleDamage.sqf | 7 -- 2 files changed, 73 insertions(+), 8 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 87dc9be80c..56b1cbc880 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -68,6 +68,8 @@ GVAR(effectUnconsciousUnit) = objNull; GVAR(effectBlind) = false; GVAR(effectTimeBlood) = time; + +// MAIN EFFECTS LOOP [{ // Zeus interface is open or player is dead; disable everything if (!(isNull (findDisplay 312)) or !(alive ACE_player)) exitWith { @@ -127,6 +129,76 @@ GVAR(effectTimeBlood) = time; GVAR(effectBloodVolumeCC) ppEffectAdjust [1,1,0, [0,0,0,0], [1,1,1,_blood], [0.2,0.2,0.2,0]]; GVAR(effectBloodVolumeCC) ppEffectCommit 0; }; +}, 0.5, []] call CBA_fnc_addPerFrameHandler; + + +GVAR(lastHeartBeat) = time; + +// @todo, remove once parameters are set up +if (isNil QGVAR(level)) then { + GVAR(level) = 0; +}; + +// HEARTRATE BASED EFFECTS +[{ + _heartRate = ACE_player getVariable [QGVAR(heartRate), 70]; + if (GVAR(level) == 0) then { + _heartRate = 60 + 40 * (ACE_player getVariable [QGVAR(pain), 0]); + _heartRate = _heartRate min 120; + }; + _interval = 60 / _heartRate; + if (time < GVAR(lastHeartBeat) + _interval) exitWith {}; + GVAR(lastHeartBeat) = time; + + // Pain effect + _strength = ACE_player getVariable [QGVAR(pain), 0]; + // _strength = _strength * (ACE_player getVariable [QGVAR(coefPain), GVAR(coefPain)]); @todo + GVAR(alternativePainEffect) = false; // @todo + if (GVAR(alternativePainEffect)) then { + GVAR(effectPainCC) ppEffectEnable false; + if ((ACE_player getVariable [QGVAR(pain), 0]) > 0 && {alive ACE_player}) then { + _strength = _strength * 0.15; + GVAR(effectPainCA) ppEffectEnable true; + GVAR(effectPainCA) ppEffectAdjust [_strength, _strength, false]; + GVAR(effectPainCA) ppEffectCommit 0.01; + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCA) ppEffectAdjust [(_this select 0), (_this select 0), false]; + GVAR(effectPainCA) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCA) ppEffectEnable false; + }; + } else { + GVAR(effectPainCA) ppEffectEnable false; + if ((ACE_player getVariable [QGVAR(pain), 0]) > 0 && {alive ACE_player}) then { + _strength = _strength * 0.6; + GVAR(effectPainCC) ppEffectEnable true; + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - _strength,1 - _strength,0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit 0.01; + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.2], _interval * 0.05, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit 0.01; + }, [_strength * 0.7], _interval * 0.3, 0] call EFUNC(common,waitAndExecute); + [{ + GVAR(effectPainCC) ppEffectAdjust [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1 - (_this select 0),1 - (_this select 0),0,0,0,0.2,2]]; + GVAR(effectPainCC) ppEffectCommit (_this select 1); + }, [_strength * 0.1, _interval * 0.55], _interval * 0.4, 0] call EFUNC(common,waitAndExecute); + } else { + GVAR(effectPainCC) ppEffectEnable false; + }; + }; /* @todo // Heart rate sound effect @@ -152,4 +224,4 @@ GVAR(effectTimeBlood) = time; }; }; */ -}, 0.5, []] call CBA_fnc_addPerFrameHandler; +}, 0, []] call CBA_fnc_addPerFrameHandler; diff --git a/addons/medical/functions/fnc_handleDamage.sqf b/addons/medical/functions/fnc_handleDamage.sqf index f3d79996db..b1c1f7575a 100644 --- a/addons/medical/functions/fnc_handleDamage.sqf +++ b/addons/medical/functions/fnc_handleDamage.sqf @@ -38,13 +38,6 @@ _hitSelections = ["head", "body", "hand_l", "hand_r", "leg_l", "leg_r"]; if !(_selection in (_hitSelections + [""])) exitWith {0}; _damageReturn = _damage; - -// @todo, remove once parameters are set up -if (isNil QGVAR(level)) then { - GVAR(level) = 0; -}; - -_damageReturn = (_this select 2); _typeOfDamage = [_this select 4] call FUNC(getTypeOfDamage); if (GVAR(level) >= 0) then { From 3aae72aa70744ed3d659dd69536b4f9fcb8e5c00 Mon Sep 17 00:00:00 2001 From: KoffeinFlummi Date: Wed, 18 Feb 2015 19:22:35 +0100 Subject: [PATCH 8/8] Cleanup --- addons/medical/XEH_postInit.sqf | 6 ------ 1 file changed, 6 deletions(-) diff --git a/addons/medical/XEH_postInit.sqf b/addons/medical/XEH_postInit.sqf index 56b1cbc880..f1c3f22333 100644 --- a/addons/medical/XEH_postInit.sqf +++ b/addons/medical/XEH_postInit.sqf @@ -61,14 +61,10 @@ GVAR(effectPainCC) = [ [1,1,0, [1,1,1,1], [0,0,0,0], [1,1,1,1], [1.3,1.3,0,0,0,0.2,2]] ] call _fnc_createEffect; -// @todo; what's this for? -GVAR(effectUnconsciousUnit) = objNull; - // Initialize Other Variables GVAR(effectBlind) = false; GVAR(effectTimeBlood) = time; - // MAIN EFFECTS LOOP [{ // Zeus interface is open or player is dead; disable everything @@ -111,8 +107,6 @@ GVAR(effectTimeBlood) = time; }; }; - // @todo: pain effect - // Bleeding Indicator // @todo: redo this after initial release if (damage ACE_player > 0.1 and GVAR(effectTimeBlood) + 6 < time) then {