This commit is contained in:
PabstMirror 2015-02-16 18:30:35 -06:00
parent eee4b256cd
commit dc82e50d72
4 changed files with 6 additions and 5 deletions

View File

@ -81,7 +81,7 @@ class CfgVehicles {
};
class ACE_StartSurrenderingSelf {
displayName = "$STR_ACE_Captives_StartSurrendering";
condition = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
condition = QUOTE([ARR_2(_player, true)] call FUNC(canSurrender));
statement = QUOTE([ARR_2(_player, true)] call FUNC(setSurrendered));
exceptions[] = {};
showDisabled = 0;

View File

@ -3,6 +3,7 @@
//Handles when someone starts escorting and then disconnects, leaving the captive attached
//This is normaly handled by the PFEH in doEscortCaptive, but that won't be running if they DC
if (isServer) then {
addMissionEventHandler ["HandleDisconnect", {
PARAMS_1(_disconnectedPlayer);

View File

@ -22,8 +22,8 @@ PREP(handleKnockedOut);
PREP(handlePlayerChanged);
PREP(handleUnitInitPost);
PREP(handleVehicleChanged);
PREP(handleZeusDisplayChanged);
PREP(handleWokeUp);
PREP(handleZeusDisplayChanged);
PREP(moduleSurrender);
PREP(setHandcuffed);
PREP(setSurrendered);

View File

@ -29,13 +29,13 @@ if (local _logic) then {
if ((_mouseOverObject isKindOf "CAManBase") && {(vehicle _mouseOverObject) == _mouseOverObject}) then {
systemChat format ["Debug - module surrendering %1", (name _mouseOverObject)];
[_mouseOverObject, true] call FUNC(setSurrendered);
if (!(_mouseOverObject getVariable [GVAR(), false])) then {
if (!(_mouseOverObject getVariable [QGVAR(isSurrendering), false])) then {
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, true]] call EFUNC(common,targetEvent);
} else {
["SetSurrendered", [_mouseOverObject], [_mouseOverObject, false]] call EFUNC(common,targetEvent);
};
} else {
systemChat format ["Only use on dismounted inf"];
};