#2018 - Dead Mans Switch / unconscious

This commit is contained in:
PabstMirror 2015-08-05 11:54:45 -05:00
parent 72273c5ad0
commit a6292db1e8
4 changed files with 12 additions and 2 deletions

View File

@ -11,7 +11,7 @@ class Extended_PostInit_EventHandlers {
class Extended_Killed_EventHandlers {
class CAManBase {
GVAR(killedHandler) = QUOTE(_this call FUNC(onKilled));
GVAR(killedHandler) = QUOTE(_this call FUNC(onIncapacitated));
};
};

View File

@ -15,6 +15,16 @@
*/
#include "script_component.hpp"
if (isServer) then {
//Event is global, only run on server (ref: ace_medical_fnc_setUnconscious)
["medical_onUnconscious", {
params ["_unit", "_isUnconscious"];
if (!_isUnconscious) exitWith {};
TRACE_1("Knocked Out, Doing Deadman", _unit);
[_unit] call FUNC(onIncapacitated);
}] call EFUNC(common,addEventHandler);
};
if !(hasInterface) exitWith {};
GVAR(PlacedCount) = 0;

View File

@ -44,8 +44,8 @@ PREP(getSpeedDialExplosive);
PREP(module);
PREP(onIncapacitated);
PREP(onInventoryChanged);
PREP(onKilled);
PREP(openTimerSetUI);