From 4603715fd880b26c1e98dea8de7de76b9f2b8350 Mon Sep 17 00:00:00 2001 From: Alex Crooks Date: Sun, 6 Nov 2016 23:27:03 +0000 Subject: [PATCH] Move to unscheduled --- addons/main/XEH_postInit.sqf | 2 +- addons/main/functions/fnc_trackLoop.sqf | 9 +++------ addons/main/script_mod.hpp | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/addons/main/XEH_postInit.sqf b/addons/main/XEH_postInit.sqf index c540de5..c9bce3a 100644 --- a/addons/main/XEH_postInit.sqf +++ b/addons/main/XEH_postInit.sqf @@ -20,7 +20,7 @@ if !(isServer) exitWith { ERROR_WITH_TITLE("AAR - ERROR", "Addon must be run ser ["replaySetup", { // Start event saving buffer - [] spawn FUNC(trackLoop); + call FUNC(trackLoop); call FUNC(addMissionEventHandlers); diff --git a/addons/main/functions/fnc_trackLoop.sqf b/addons/main/functions/fnc_trackLoop.sqf index 0e660a5..bf48a9b 100644 --- a/addons/main/functions/fnc_trackLoop.sqf +++ b/addons/main/functions/fnc_trackLoop.sqf @@ -24,11 +24,10 @@ private _timeSinceLastGroundVehicleInsert = time; private _timeSinceLastAirVehicleInsert = time; private _timeSinceLastMarkerInsert = time; -// Just log markers once +// Just log markers once (for now) call FUNC(trackMarkers); -while { true } do { - +[{ if (GVAR(logEvents)) then { // We only want to log movements if there are players in the map @@ -66,6 +65,4 @@ while { true } do { GVAR(noPlayers) = true; }; }; - - sleep (0.2); -}; +}, 0.2] call CBA_fnc_addPerFrameHandler; \ No newline at end of file diff --git a/addons/main/script_mod.hpp b/addons/main/script_mod.hpp index 87d0006..734b195 100644 --- a/addons/main/script_mod.hpp +++ b/addons/main/script_mod.hpp @@ -5,7 +5,7 @@ #define MAJOR 1 #define MINOR 0 -#define PATCHLVL 3 +#define PATCHLVL 4 #define BUILD 0 #define VERSION MAJOR.MINOR.PATCHLVL.BUILD