diff --git a/SQF/dayz_code/compile/client_evr.sqf b/SQF/dayz_code/compile/client_evr.sqf index e175e1d05..61f6178eb 100644 --- a/SQF/dayz_code/compile/client_evr.sqf +++ b/SQF/dayz_code/compile/client_evr.sqf @@ -387,7 +387,7 @@ fnc_evr = { local _vehicle = vehicle player; if (player == _vehicle) then { - if (_hasAPSI) then { + if (_hasAPSI || {DZE_EVRProtectInside && dayz_inside}) then { player switchMove ""; [objNull, player, rswitchMove, ""] call RE; } else { @@ -401,7 +401,7 @@ fnc_evr = { player action ["engineOff",_vehicle]; _vehicle setFuel _fuel; } else { - if !(_hasAPSI) then { + if (!_hasAPSI && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then { player action ["eject",_vehicle]; [] spawn { uiSleep 3; @@ -417,13 +417,11 @@ fnc_evr = { uiSleep 0.1; titleText["","BLACK OUT",1]; - if (!_hasAPSI) then { + if (!_hasAPSI && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then { r_player_inpain = true; player setVariable["USEC_inPain",true,true]; - if (!dayz_inside) then { - local _blood = r_player_blood - ((DZE_EVRBloodLoss select 0) max random(DZE_EVRBloodLoss select 1)); // Player is not inside a building so reduce blood. - r_player_blood = [_blood,1000] select (_blood < 1000); // Player will have at least 1000 blood. - }; + local _blood = r_player_blood - ((DZE_EVRBloodLoss select 0) max random(DZE_EVRBloodLoss select 1)); // Player is not inside a building so reduce blood. + r_player_blood = [_blood,1000] select (_blood < 1000); // Player will have at least 1000 blood. }; uiSleep 1; @@ -455,7 +453,7 @@ fnc_evr = { "dynamicBlur" ppEffectCommit 16; if (!_hasAPSI) then { - if (player == vehicle player) then { + if (player == vehicle player && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then { uiSleep 10; // 10 second knockout. [nil, player, rSWITCHMOVE, "AmovPpneMstpSnonWnonDnon_healed"] call RE; player SWITCHMOVE "AmovPpneMstpSnonWnonDnon_healed"; diff --git a/SQF/dayz_code/configVariables.sqf b/SQF/dayz_code/configVariables.sqf index b7ac7ba3f..13a8742ae 100644 --- a/SQF/dayz_code/configVariables.sqf +++ b/SQF/dayz_code/configVariables.sqf @@ -537,6 +537,7 @@ if (!isDedicated) then { if (DZE_EVR) then { DZE_EVRWhiteFlash = true; // Turns On/Off the white flash within the EVR Storm, this is an important option for players who suffers from epilepsy. DZE_EVRHandleVehicles = true; // Enable/Disable that vehicles getting effected by the EVR Storm, the EVR Storm turns off the vehicle engine if enabled. + DZE_EVRProtectInside = true; // Skips the unconscious animation, pain and blood loss when the player is inside a building. DZE_EVRDamageItemsChance = .20; // Chance that an EVR storm will damage items in inventory. From 0 to 1. Chance applies to each item. Set to 0 to disable. DZE_EVRDamageItems = [["Binocular_Vector","Binocular_VectorBroken"],["NVGoggles_DZE","ItemNVGFullBroken_DZE"],["NVGoggles","ItemNVGBroken_DZE"],["ItemGPS","ItemGPSBroken_DZE"],["ItemRadio","ItemRadioBroken_DZE"],["Smartphone_DZE","SmartphoneBroken_DZE"]]; // [item (input), damaged item (output)]. Items that have a chance to be damaged by EMP. DZE_EVRBloodLoss = [4000,8000]; // Random number of blood loss if a player does not have an APSI and/or is not inside a building [min, max]. Player will not die, there is a minimum of 1000 after the calculation