mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-19 10:02:02 +03:00
After buying a weapon the weapon should be selected correctly now
Thx iben for the fix.
This commit is contained in:
@@ -3,17 +3,16 @@
|
||||
when the player's currently selected weapon is a throwable.
|
||||
*/
|
||||
|
||||
private ["_main","_muzzle"];
|
||||
|
||||
if (currentWeapon player == "Throw") then {
|
||||
_main = primaryWeapon player;
|
||||
if (currentWeapon player in ["Throw", ""]) then {
|
||||
local _main = primaryWeapon player;
|
||||
if (_main == "") then {
|
||||
{
|
||||
if (getNumber (configFile >> "CfgWeapons" >> _x >> "type") == 2) then {_main = _x;};
|
||||
} count (weapons player);
|
||||
};
|
||||
|
||||
_muzzle = getArray (configFile >> "CfgWeapons" >> _main >> "muzzles");
|
||||
if (_main == "") exitWith {};
|
||||
local _muzzle = getArray (configFile >> "CfgWeapons" >> _main >> "muzzles");
|
||||
if (count _muzzle > 1) then {
|
||||
player selectWeapon (_muzzle select 0);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user