mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 12:12:34 +03:00
Fix copy key failing when player has no backpack
Related to #1567, so I made this a function so it can be reused. People should call this whenever they are adding a toolbelt item which the player may already have. It has localized strings and handles spawning the weapon holder on water, land and rooftop. Tested both the sledgehammer and key copying. Confirmed all three conditions are working.
This commit is contained in:
@@ -141,6 +141,7 @@ if (!isDedicated) then {
|
||||
onPreloadFinished "if (!isNil 'init_keyboard') then { [] spawn init_keyboard; }; dayz_preloadFinished = true;";
|
||||
|
||||
// helper functions
|
||||
player_addDuplicateTool = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_addDuplicateTool.sqf";
|
||||
player_hasTools = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_hasTools.sqf";
|
||||
player_checkItems = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_checkItems.sqf";
|
||||
player_removeItems = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\fn_removeItems.sqf";
|
||||
|
||||
Reference in New Issue
Block a user