@@ -19,15 +19,16 @@ private _functionLogName = "AAR > trackLoop";
1919
2020DBUG(" Starting track loop" , _functionLogName );
2121
22- private _timeSinceLastInfantryInsert = time;
23- private _timeSinceLastGroundVehicleInsert = time;
24- private _timeSinceLastAirVehicleInsert = time;
25- private _timeSinceLastMarkerInsert = time;
22+ GVAR(timeSinceLastInfantryInsert) = time;
23+ GVAR(timeSinceLastGroundVehicleInsert) = time;
24+ GVAR(timeSinceLastAirVehicleInsert) = time;
25+ GVAR(timeSinceLastMarkerInsert) = time;
2626
2727// Just log markers once (for now)
2828call FUNC(trackMarkers);
2929
3030[{
31+
3132 if (GVAR(logEvents)) then {
3233
3334 // We only want to log movements if there are players in the map
@@ -45,20 +46,19 @@ call FUNC(trackMarkers);
4546 GVAR(noPlayers) = false ;
4647
4748 // We save unit positions at different frequencies depending on their vehicle
48-
49- if (time >= _timeSinceLastInfantryInsert + GVAR(insertFrequencyInfantry)) then {
49+ if (time >= GVAR(timeSinceLastInfantryInsert) + GVAR(insertFrequencyInfantry)) then {
5050 call FUNC(trackInfantry);
51- _timeSinceLastInfantryInsert = time;
51+ GVAR(timeSinceLastInfantryInsert) = time;
5252 };
5353
54- if (time >= _timeSinceLastGroundVehicleInsert + GVAR(insertFrequencyGroundVehicle)) then {
54+ if (time >= GVAR(timeSinceLastGroundVehicleInsert) + GVAR(insertFrequencyGroundVehicle)) then {
5555 [" ground" ] call FUNC(trackVehicles);
56- _timeSinceLastGroundVehicleInsert = time;
56+ GVAR(timeSinceLastGroundVehicleInsert) = time;
5757 };
5858
59- if (time >= _timeSinceLastAirVehicleInsert + GVAR(insertFrequencyAirVehicle)) then {
59+ if (time >= GVAR(timeSinceLastAirVehicleInsert) + GVAR(insertFrequencyAirVehicle)) then {
6060 [" air" ] call FUNC(trackVehicles);
61- _timeSinceLastAirVehicleInsert = time;
61+ GVAR(timeSinceLastAirVehicleInsert) = time;
6262 };
6363
6464 } else {
0 commit comments