Add DZE_EVRHandleVehicles for EVR Storms

The EVR Storm turns off the vehicle engine if enabled.
This commit is contained in:
A Man
2022-05-02 11:32:14 +02:00
parent 3d9914a239
commit 70a7629433
19 changed files with 55 additions and 19 deletions

View File

@@ -384,7 +384,9 @@ fnc_evr = {
disableUserInput false; disableUserInput false;
disableUserInput true; disableUserInput true;
if (player == vehicle player) then {
local _vehicle = vehicle player;
if (player == _vehicle) then {
if (_hasAPSI) then {
player switchMove "";
[objNull, player, rswitchMove, ""] call RE;
@@ -392,6 +394,22 @@ fnc_evr = {
player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation
[objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE;
};
} else {
if (DZE_EVRHandleVehicles && {isEngineOn _vehicle && ((speed _vehicle) > 10)}) then {
local _fuel = fuel _vehicle;
_vehicle setFuel 0;
player action ["engineOff",_vehicle];
_vehicle setFuel _fuel;
} else {
if !(_hasAPSI) then {
player action ["eject",_vehicle];
[] spawn {
uiSleep 3;
player switchMove "AcinPercMrunSnonWnonDf_agony"; // knockout animation
[objNull, player, rSwitchMove, "AcinPercMrunSnonWnonDf_agony"] call RE;
};
};
};
};
uiSleep 0.1;