Add DZE_EVRProtectInside part 2

This commit is contained in:
A Man
2022-05-02 12:56:13 +02:00
parent c721bab8cc
commit 0b0db3f57d
2 changed files with 7 additions and 8 deletions

View File

@@ -387,7 +387,7 @@ fnc_evr = {
local _vehicle = vehicle player; local _vehicle = vehicle player;
if (player == _vehicle) then { if (player == _vehicle) then {
if (_hasAPSI) then { if (_hasAPSI || {DZE_EVRProtectInside && dayz_inside}) then {
player switchMove ""; player switchMove "";
[objNull, player, rswitchMove, ""] call RE; [objNull, player, rswitchMove, ""] call RE;
} else { } else {
@@ -401,7 +401,7 @@ fnc_evr = {
player action ["engineOff",_vehicle]; player action ["engineOff",_vehicle];
_vehicle setFuel _fuel; _vehicle setFuel _fuel;
} else { } else {
if !(_hasAPSI) then { if (!_hasAPSI && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then {
player action ["eject",_vehicle]; player action ["eject",_vehicle];
[] spawn { [] spawn {
uiSleep 3; uiSleep 3;
@@ -417,13 +417,11 @@ fnc_evr = {
uiSleep 0.1; uiSleep 0.1;
titleText["","BLACK OUT",1]; titleText["","BLACK OUT",1];
if (!_hasAPSI) then { if (!_hasAPSI && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then {
r_player_inpain = true; r_player_inpain = true;
player setVariable["USEC_inPain",true,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.
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.
r_player_blood = [_blood,1000] select (_blood < 1000); // Player will have at least 1000 blood.
};
}; };
uiSleep 1; uiSleep 1;
@@ -455,7 +453,7 @@ fnc_evr = {
"dynamicBlur" ppEffectCommit 16; "dynamicBlur" ppEffectCommit 16;
if (!_hasAPSI) then { if (!_hasAPSI) then {
if (player == vehicle player) then { if (player == vehicle player && {!DZE_EVRProtectInside || (DZE_EVRProtectInside && !dayz_inside)}) then {
uiSleep 10; // 10 second knockout. uiSleep 10; // 10 second knockout.
[nil, player, rSWITCHMOVE, "AmovPpneMstpSnonWnonDnon_healed"] call RE; [nil, player, rSWITCHMOVE, "AmovPpneMstpSnonWnonDnon_healed"] call RE;
player SWITCHMOVE "AmovPpneMstpSnonWnonDnon_healed"; player SWITCHMOVE "AmovPpneMstpSnonWnonDnon_healed";

View File

@@ -537,6 +537,7 @@ if (!isDedicated) then {
if (DZE_EVR) 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_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_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_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_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 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