mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
#2018 - Dead Mans Switch / unconscious
This commit is contained in:
parent
72273c5ad0
commit
a6292db1e8
@ -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));
|
||||
};
|
||||
};
|
||||
|
||||
|
@ -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;
|
||||
|
@ -44,8 +44,8 @@ PREP(getSpeedDialExplosive);
|
||||
|
||||
PREP(module);
|
||||
|
||||
PREP(onIncapacitated);
|
||||
PREP(onInventoryChanged);
|
||||
PREP(onKilled);
|
||||
|
||||
PREP(openTimerSetUI);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user