Skip to content

Commit

Permalink
added QGVAR
Browse files Browse the repository at this point in the history
  • Loading branch information
Madin authored and Madin committed Oct 18, 2023
1 parent d31d916 commit e0cd37a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
9 changes: 5 additions & 4 deletions addons/staticspawn/functions/fnc_despawnLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
[
{
Expand Down
3 changes: 2 additions & 1 deletion addons/staticspawn/functions/fnc_loop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit e0cd37a

Please sign in to comment.