Make free slots display more accurate in gear

Use the cursorTarget at the time the gear dialog was opened instead of
the cursorTarget at the time the script runs. The script can be delayed
by several seconds (spawn is scheduled).
This commit is contained in:
ebayShopper
2017-04-14 17:18:16 -04:00
parent e99792d0f4
commit 4bf4c62b1d
4 changed files with 6 additions and 6 deletions

View File

@@ -4,10 +4,8 @@ class RscDisplayGear
enableDisplay = 1;
movingEnable = 0;
//onLoad = "[] spawn object_monitorGear; false call dz_fn_meleeMagazines; call gear_ui_init; call ui_gear_sound; if (isNil('IGUI_GEAR_activeFilter')) then { IGUI_GEAR_activeFilter = 0;}; [_this,'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";/* diag_log 'RscDisplayGear : : onLoad'; */
//onUnload = "false call dz_fn_meleeMagazines; call player_forceSave; call dayz_meleeMagazineCheck;"; /* diag_log 'RscDisplayGear : : onunLoad'; */
onLoad = "setMousePosition [0.5, 0.5];_this call fn_gearMenuChecks; false call dz_fn_meleeMagazines; [] spawn object_monitorGear; call gear_ui_init; call ui_gear_sound; if (isNil 'IGUI_GEAR_activeFilter') then {IGUI_GEAR_activeFilter = 0}; [_this, 'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
onUnload = "true call dz_fn_meleeMagazines; call player_selectWeapon; call player_forceSave;";
onLoad = "_this call fn_gearMenuChecks; false call dz_fn_meleeMagazines; dayz_gearThread = cursorTarget spawn object_monitorGear; call gear_ui_init; call ui_gear_sound; if (isNil 'IGUI_GEAR_activeFilter') then {IGUI_GEAR_activeFilter = 0}; [_this, 'onLoad'] execVM '\z\addons\dayz_code\system\handleGear.sqf'";
onUnload = "true call dz_fn_meleeMagazines; terminate dayz_gearThread; call player_selectWeapon; call player_forceSave;";
onMouseMoving = "[] call gear_ui_hide;";
onMouseHolding = "[] call gear_ui_hide;";