mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-21 19:06:29 +03:00
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:
@@ -1,3 +1,6 @@
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
private ["_skin","_rnd","_rounded","_itemtocreate","_i","_config","_result","_finished"];
|
||||
|
||||
_skin = _this;
|
||||
@@ -9,11 +12,8 @@ _rounded = round _rnd;
|
||||
call gear_ui_init;
|
||||
closeDialog 0;
|
||||
|
||||
if (dayz_actionInProgress) exitWith { localize "str_player_actionslimit" call dayz_rollingMessages; };
|
||||
dayz_actionInProgress = true;
|
||||
|
||||
//Tear the clothes
|
||||
[player,"bandage",0,false] call dayz_zombieSpeak;
|
||||
[player,(getPosATL player),10,"bandage"] spawn fnc_alertZombies;
|
||||
_finished = ["Medic",1] call fn_loopAction;
|
||||
if (!_finished) exitWith {
|
||||
dayz_actionInProgress = false;
|
||||
@@ -44,14 +44,14 @@ switch (_rounded) do {
|
||||
false call dz_fn_meleeMagazines;
|
||||
_i = 0;
|
||||
while {_i < _rounded} do {
|
||||
_i = _i + 1;
|
||||
_i = _i + 1;
|
||||
_result = [player,_itemtocreate] call BIS_fnc_invAdd;
|
||||
|
||||
|
||||
if (_rnd < 0.5) then {
|
||||
[player,"equip_string"] call BIS_fnc_invAdd;
|
||||
};
|
||||
uiSleep 0.03;
|
||||
|
||||
|
||||
if (!_result) then {
|
||||
systemchat (localize ("str_tear_clothes_noroom"));
|
||||
[_itemtocreate,1,1] call fn_dropItem;
|
||||
@@ -59,4 +59,4 @@ while {_i < _rounded} do {
|
||||
};
|
||||
true call dz_fn_meleeMagazines;
|
||||
|
||||
dayz_actionInProgress = false;
|
||||
dayz_actionInProgress = false;
|
||||
|
||||
Reference in New Issue
Block a user