mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
7c846502b5
Previously we were resetting on death, but this caused problems when the respawnDelay was 0 as the dead unit wasn't actually the player. To account for "group" and "side" respawn types where you change unit on respawn and could potentially become a captive unit, I am explicity checking the mission respawn type before resetting variables.
44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
class Extended_PreInit_EventHandlers {
|
|
class ADDON {
|
|
init = QUOTE(call COMPILE_FILE(XEH_preInit));
|
|
};
|
|
};
|
|
|
|
class Extended_PostInit_EventHandlers {
|
|
class ADDON {
|
|
init = QUOTE(call COMPILE_FILE(XEH_postInit));
|
|
};
|
|
};
|
|
//release escorted captive when entering a vehicle
|
|
class Extended_GetIn_EventHandlers {
|
|
class All {
|
|
class GVAR(AutoDetachCaptive) {
|
|
getIn = QUOTE(_this call FUNC(handleGetIn));
|
|
};
|
|
};
|
|
};
|
|
//reset captive animation after leaving vehicle
|
|
class Extended_GetOut_EventHandlers {
|
|
class All {
|
|
class GVAR(AutoDetachCaptive) {
|
|
getOut = QUOTE(_this call FUNC(handleGetOut));
|
|
};
|
|
};
|
|
};
|
|
//mission start
|
|
class Extended_InitPost_EventHandlers {
|
|
class CAManBase {
|
|
class GVAR(InitPost) {
|
|
init = QUOTE(_this call FUNC(handleUnitInitPost));
|
|
};
|
|
};
|
|
};
|
|
//make sure captiveNum is reset on respawn
|
|
class Extended_Respawn_EventHandlers {
|
|
class CAManBase {
|
|
class ADDON {
|
|
respawn = QUOTE(_this call FUNC(handleRespawn));
|
|
};
|
|
};
|
|
};
|