Skip to content

Commit

Permalink
optimize fallback loop (#1120)
Browse files Browse the repository at this point in the history
  • Loading branch information
commy2 authored Apr 21, 2019
1 parent 94c9723 commit 4cc2646
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/xeh/fnc_startFallbackLoop.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ GVAR(entities) = [];
private _entities = entities [[], [], true, true];

if !(_entities isEqualTo GVAR(entities)) then {
private _newEntities = _entities - GVAR(entities);
GVAR(entities) = _entities;

{
Expand All @@ -48,7 +49,6 @@ GVAR(entities) = [];
_x call CBA_fnc_init;
};
};
nil
} count _entities;
} forEach _newEntities;
};
}, 0.1, []] call CBA_fnc_addPerFrameHandler;

0 comments on commit 4cc2646

Please sign in to comment.