mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Ensure captiveNum is reset for respawning unit
This commit is contained in:
parent
91b63fbb7d
commit
811530f180
@ -41,3 +41,11 @@ class Extended_InitPost_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
//make sure captiveNum is reset on respawn
|
||||
class Extended_Respawn_EventHandlers {
|
||||
class CAManBase {
|
||||
class ADDON {
|
||||
respawn = QUOTE(_this call FUNC(handleRespawn));
|
||||
};
|
||||
};
|
||||
};
|
||||
|
@ -21,6 +21,7 @@ PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleOnUnconscious);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleRespawn);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
|
25
addons/captives/functions/fnc_handleRespawn.sqf
Normal file
25
addons/captives/functions/fnc_handleRespawn.sqf
Normal file
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Author: commy2 PabstMirror
|
||||
* Fix, because captiveNum doesn't reset properly on respawn
|
||||
*
|
||||
* Arguments:
|
||||
* 0: Unit <OBJECT>
|
||||
* 1: Corpse <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
*
|
||||
* Example:
|
||||
* [alive, body] call ACE_captives_fnc_handleRespawn;
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_dead);
|
||||
|
||||
if (!local _unit) exitWith {};
|
||||
|
||||
[_unit, QGVAR(Handcuffed), false] call EFUNC(common,setCaptivityStatus);
|
||||
[_unit, QGVAR(Surrendered), false] call EFUNC(common,setCaptivityStatus);
|
||||
|
Loading…
Reference in New Issue
Block a user