mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Back to getIn
This commit is contained in:
parent
dc82e50d72
commit
9cdf06383d
@ -9,7 +9,14 @@ class Extended_PostInit_EventHandlers {
|
||||
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 {
|
||||
@ -18,7 +25,6 @@ class Extended_GetOut_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//reset captivity and escorting status when getting killed
|
||||
class Extended_Killed_EventHandlers {
|
||||
class CAManBase {
|
||||
@ -27,7 +33,6 @@ class Extended_Killed_EventHandlers {
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
//mission start
|
||||
class Extended_InitPost_EventHandlers {
|
||||
class CAManBase {
|
||||
|
@ -90,7 +90,7 @@ class CfgVehicles {
|
||||
class ACE_StopSurrenderingSelf {
|
||||
displayName = "$STR_ACE_Captives_StopSurrendering";
|
||||
condition = QUOTE([ARR_2(_player, false)] call FUNC(canSurrender));
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrender));
|
||||
statement = QUOTE([ARR_2(_player, false)] call FUNC(setSurrendered));
|
||||
exceptions[] = {QGVAR(isNotSurrendering)};
|
||||
showDisabled = 0;
|
||||
priority = 0;
|
||||
|
@ -16,12 +16,12 @@ PREP(doFriskPerson);
|
||||
PREP(doLoadCaptive);
|
||||
PREP(doRemoveHandcuffs);
|
||||
PREP(doUnloadCaptive);
|
||||
PREP(handleGetIn);
|
||||
PREP(handleGetOut);
|
||||
PREP(handleKilled);
|
||||
PREP(handleKnockedOut);
|
||||
PREP(handlePlayerChanged);
|
||||
PREP(handleUnitInitPost);
|
||||
PREP(handleVehicleChanged);
|
||||
PREP(handleWokeUp);
|
||||
PREP(handleZeusDisplayChanged);
|
||||
PREP(moduleSurrender);
|
||||
|
@ -1,25 +1,25 @@
|
||||
/*
|
||||
* Author: commy2
|
||||
* Handles when a player's vehicle changes (supports scripted vehicle changes)
|
||||
* Handles when a unit gets in to a vehicle. Release escorted captive when entering a vehicle
|
||||
*
|
||||
* Arguments:
|
||||
* 0: unit <OBJECT>
|
||||
* 1: newVehicle <OBJECT>
|
||||
* 0: _vehicle <OBJECT>
|
||||
* 2: dunno <OBJECT>
|
||||
* 1: _unit <OBJECT>
|
||||
*
|
||||
* Return Value:
|
||||
* Nothing
|
||||
* The return value <BOOL>
|
||||
*
|
||||
* Example:
|
||||
* [player, car] call ACE_captives_fnc_handleVehicleChanged
|
||||
* [car2, x, player] call ACE_captives_fnc_handleGetIn
|
||||
*
|
||||
* Public: No
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
PARAMS_2(_unit,_vehicle);
|
||||
PARAMS_3(_vehicle,_dontcare,_unit);
|
||||
|
||||
//When moved into a vehicle (action or scripted)
|
||||
if ((vehicle _unit) != _unit) then {
|
||||
if (local _unit) then {
|
||||
if (_unit getVariable [QGVAR(isEscorting), false]) then {
|
||||
_unit setVariable [QGVAR(isEscorting), false, true];
|
||||
};
|
@ -28,8 +28,7 @@ if (local _logic) then {
|
||||
_mouseOverObject = _bisMouseOver select 1;
|
||||
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
|
||||
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)];
|
||||
[_mouseOverObject, true] call FUNC(setSurrendered);
|
||||
|
||||
|
||||
if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
|
||||
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user