diff --git a/CHANGE LOG 1.0.6.txt b/CHANGE LOG 1.0.6.txt index 33c3f6590..8a5e0d3ef 100644 --- a/CHANGE LOG 1.0.6.txt +++ b/CHANGE LOG 1.0.6.txt @@ -72,7 +72,6 @@ [FIXED] Fire cleanup diag_log error in server_functions.sqf #1421 @ebaydayz [FIXED] NearestObjects position error in server_playerSync.sqf #1425 @ebaydayz [FIXED] Corrected ClassName type for CH53_DZE and BAF_Merlin_DZE. @Cinjun -[FIXED] Some counts reverted to forEach. Count loops can not be nested inside other count loops #1491-#1495 @ebaydayz [FIXED] Dynamic_vehicle spawning non-upgradable classes of hilux1 & datsun1. @Uro1 [FIXED] Eating while inside a vehicle did not drop empty can @deadeye2 [FIXED] Zombie loot error when using loot tables in mission file @deadeye2 diff --git a/SQF/dayz_code/actions/player_switchWeapon.sqf b/SQF/dayz_code/actions/player_switchWeapon.sqf index 8e0803808..e4c82f06a 100644 --- a/SQF/dayz_code/actions/player_switchWeapon.sqf +++ b/SQF/dayz_code/actions/player_switchWeapon.sqf @@ -14,6 +14,8 @@ #define FIND_MELEE() (1 call dz_fn_switchWeapon_find) dz_switchWeapon_mutex = Mutex_New(); +dz_switchWeapon_time = 0; +dz_switchWeapon_pistolTime = 0; //0: switch rifle/melee instantly and update gear //1: switch rifle/melee with animation diff --git a/SQF/dayz_code/actions/player_switchWeapon_action.sqf b/SQF/dayz_code/actions/player_switchWeapon_action.sqf index 2ca0ead40..4039a347f 100644 --- a/SQF/dayz_code/actions/player_switchWeapon_action.sqf +++ b/SQF/dayz_code/actions/player_switchWeapon_action.sqf @@ -1 +1,9 @@ -1 call dz_fn_switchWeapon; \ No newline at end of file +if (primaryWeapon player == "") then { + if (dayz_onBack in MeleeWeapons) then { + 4 call dz_fn_switchWeapon; // Melee + } else { + 2 call dz_fn_switchWeapon; // Rifle + }; +} else { + 1 call dz_fn_switchWeapon; +}; \ No newline at end of file