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,11 +1,11 @@
/*
Attempts to remove an attachment from the player's current primary weapon or sidearm.
Parameters:
string attachment item classname
string current weapon classname
string resulting weapon classname
Author:
Foxy
*/
@@ -53,7 +53,7 @@ if (!isClass(_newWeaponConfig) || {getText(_newWeaponConfig >> _attachment) != _
_weaponInUse = (currentWeapon player == _weapon);
[player,"detach_weap",0,false] call dayz_zombieSpeak;
[player,(getPosATL player),10,"detach_weap"] spawn fnc_alertZombies;
call gear_ui_init;
player playActionNow "Medic";
@@ -69,7 +69,7 @@ player addMagazine _attachment;
if (_weaponInUse) then
{
_muzzle = (getArray (configFile >> "CfgWeapons" >> _newWeapon >> "muzzles")) select 0;
if (_muzzle == "this") then
{
player selectWeapon _newWeapon;
@@ -78,4 +78,4 @@ if (_weaponInUse) then
{
player selectWeapon _muzzle;
};
};
};