From a466e436451cfd00bb63bddff5b510aee72c063e Mon Sep 17 00:00:00 2001 From: ebaydayz Date: Tue, 17 May 2016 16:54:58 -0400 Subject: [PATCH] Move plotManagement compiles to compiles.sqf This was needlessly recompiling every time the addAction was clicked. DisableSerialization is only needed if a display element is stored in a variable within the current script. The called functions already have it. --- .../plotManagement/initPlotManagement.sqf | 17 ----------------- SQF/dayz_code/init/compiles.sqf | 7 +++++++ 2 files changed, 7 insertions(+), 17 deletions(-) diff --git a/SQF/dayz_code/actions/plotManagement/initPlotManagement.sqf b/SQF/dayz_code/actions/plotManagement/initPlotManagement.sqf index 0ff1a10ba..f650ab691 100644 --- a/SQF/dayz_code/actions/plotManagement/initPlotManagement.sqf +++ b/SQF/dayz_code/actions/plotManagement/initPlotManagement.sqf @@ -1,22 +1,5 @@ -disableSerialization; - -PlotGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotGetFriends.sqf"; -PlotNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotNearbyHumans.sqf"; -PlotAddFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotAddFriend.sqf"; -PlotRemoveFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotRemoveFriend.sqf"; -PlotObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotObjects.sqf"; -PlotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf"; - -// use this for gold -MaintainPlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf"; - -// use this for single currency -//MaintainPlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\maintain_areaSC.sqf"; - - createdialog "PlotManagement"; call PlotNearbyHumans; call PlotGetFriends; ["preview"] call MaintainPlot; call PlotObjects; - diff --git a/SQF/dayz_code/init/compiles.sqf b/SQF/dayz_code/init/compiles.sqf index e4668b943..9f5294289 100644 --- a/SQF/dayz_code/init/compiles.sqf +++ b/SQF/dayz_code/init/compiles.sqf @@ -183,6 +183,13 @@ if (!isDedicated) then { player_unlockVault = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_unlockVault.sqf"; player_upgradeVehicle = compile preprocessFileLineNumbers "\z\addons\dayz_code\compile\player_upgradeVehicle.sqf"; player_vaultPitch = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\vault_pitch.sqf"; + PlotGetFriends = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotGetFriends.sqf"; + PlotNearbyHumans = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotNearbyHumans.sqf"; + PlotAddFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotAddFriend.sqf"; + PlotRemoveFriend = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotRemoveFriend.sqf"; + PlotObjects = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotObjects.sqf"; + PlotPreview = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\plotToggleMarkers.sqf"; + MaintainPlot = compile preprocessFileLineNumbers "\z\addons\dayz_code\actions\plotManagement\maintain_area.sqf"; // use maintain_areaSC.sqf for single currency dayz_losChance = { private["_agent","_maxDis","_dis","_val","_maxExp","_myExp"];