Group sounds and zombie calls

dayz_zombieSpeak and player_alertZombies are called often together or should be. fnc_alertZombies groups them together and uses the given parameters. This streamlines and corrects the missing or incorrect calls from dayz_zombieSpeak or player_alertZombies.
This commit is contained in:
AirwavesMan
2020-09-12 01:30:45 +02:00
parent a456c948f5
commit 9ad86a84a3
35 changed files with 193 additions and 205 deletions

View File

@@ -1,23 +1,23 @@
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool","_finished"];
if (dayz_actionInProgress) exitWith {localize "str_epoch_player_75" call dayz_rollingMessages;};
dayz_actionInProgress = true;
_hasTool = "ItemCrowbar" in items player;
if(!_hasTool) exitWith {
private ["_dir","_classname","_b0x1337","_location","_item","_config","_create_raw","_create","_qty","_type","_hasCrate","_hasTool","_finished"];
_hasTool = "ItemCrowbar" in items player;
if(!_hasTool) exitWith {
localize "str_epoch_player_76" call dayz_rollingMessages;
dayz_actionInProgress = false;
};
_item = _this;
_hasCrate = _item in magazines player;
_item = _this;
_hasCrate = _item in magazines player;
if (!_hasCrate) exitWith {
localize "str_epoch_player_77" call dayz_rollingMessages;
dayz_actionInProgress = false;
};
_config = configFile >> "CfgMagazines" >> _item;
_create_raw = getArray (_config >> "ItemActions" >> "CreateMags" >> "output");
_config = configFile >> "CfgMagazines" >> _item;
_create_raw = getArray (_config >> "ItemActions" >> "CreateMags" >> "output");
_create = _create_raw select 0;
_qty = _create_raw select 1;
_type = _create_raw select 2;
@@ -27,6 +27,8 @@ if ((_location select 2) < 0) then {
_location set [2,0];
};
[player,(getPosATL player),20,"repair"] spawn fnc_alertZombies;
_finished = ["Medic",1] call fn_loopAction;
if (!_finished or !(_item in magazines player)) exitWith {
dayz_actionInProgress = false;
@@ -41,7 +43,7 @@ _classname = "WeaponHolder";
player addMagazine "bulk_empty";
["Working",0,[20,40,15,0]] call dayz_NutritionSystem;
_b0x1337 = createVehicle [_classname, _location, [], 0, "CAN_COLLIDE"];
_b0x1337 setDir _dir;
@@ -64,7 +66,7 @@ if (surfaceIsWater _location) then {
player reveal _b0x1337;
DZE_GearCheckBypass = true; //Bypass gear menu checks since dialog will always open on crate
player action ["Gear", _b0x1337];
localize "str_epoch_player_78" call dayz_rollingMessages;
dayz_actionInProgress = false;