From e0cd37a0177525b5880bb80b884e43f833c3ad01 Mon Sep 17 00:00:00 2001 From: Madin Date: Wed, 18 Oct 2023 14:39:58 +0200 Subject: [PATCH] added QGVAR --- addons/staticspawn/functions/fnc_despawnLoop.sqf | 9 +++++---- addons/staticspawn/functions/fnc_loop.sqf | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/addons/staticspawn/functions/fnc_despawnLoop.sqf b/addons/staticspawn/functions/fnc_despawnLoop.sqf index a532a64..f8fcce2 100644 --- a/addons/staticspawn/functions/fnc_despawnLoop.sqf +++ b/addons/staticspawn/functions/fnc_despawnLoop.sqf @@ -30,10 +30,11 @@ private _playerIndex = _nearplayers findIf {isPlayer _x && !(vehicle _x isKindOf // despawn unit if (_playerIndex == -1) then { [_unit, _logic, _unitArray] call FUNC(despawn); - private _active = _logic getVariable ["active", true]; - if !(_active) then { - [_logic] call MAI_fnc_staticSpawnInterval; - }; + // private _active = _logic getVariable [QGVAR(active), true]; + // if !(_active) then { + // systemChat "despawnLoop line 35"; + // [_logic] call MAI_fnc_staticSpawnInterval; + // }; } else { [ { diff --git a/addons/staticspawn/functions/fnc_loop.sqf b/addons/staticspawn/functions/fnc_loop.sqf index 29c32da..61e03de 100644 --- a/addons/staticspawn/functions/fnc_loop.sqf +++ b/addons/staticspawn/functions/fnc_loop.sqf @@ -22,7 +22,8 @@ params [ if (_logic isEqualTo objNull) exitWith {}; private _groups = _logic getVariable [QGVAR(groups), []]; if (_groups isEqualTo []) exitWith { - _logic setVariable ["active", false]; + systemChat "loop groups isEqualTo []"; + _logic setVariable [QGVAR(active), false]; }; private _checkBuildings = _logic getVariable [QGVAR(checkBuildings), true];