From 02a6f7760089f9010c36f7f631309504f0ef765c Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Mon, 25 Nov 2013 15:57:04 -0600 Subject: [PATCH] prevent surrender if in vehicle or !cando --- SQF/dayz_code/actions/dayz_spaceInterrupt.sqf | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf b/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf index 1e34519f9..4cfcd4329 100644 --- a/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf +++ b/SQF/dayz_code/actions/dayz_spaceInterrupt.sqf @@ -14,7 +14,13 @@ if ((_dikCode == 0x3E or _dikCode == 0x0F or _dikCode == 0xD3) and (diag_tickTim // surrender if (_dikCode in actionKeys "Surrender") then { - if (!DZE_Surrender and !(player isKindOf "PZombie_VB")) then { + + _vehicle = vehicle player; + _inVehicle = (_vehicle != player); + _onLadder = (getNumber (configFile >> "CfgMovesMaleSdr" >> "States" >> (animationState player) >> "onLadder")) == 1; + _canDo = (!r_drag_sqf and !r_player_unconscious and !_onLadder and !_inVehicle); + + if (_canDo and !DZE_Surrender and !(player isKindOf "PZombie_VB")) then { DZE_Surrender = true; _dropPrimary = false; _dropSecondary = false;