Code polishing

This commit is contained in:
IT07 2016-06-02 23:20:00 +02:00
parent ca1b11e1f8
commit af16ee385c
4 changed files with 24 additions and 27 deletions

View File

@ -67,7 +67,7 @@ if (VEMFrAttackCount <= ([[_missionName],["maxAttacks"]] call VEMFr_fnc_getSetti
{
_units pushback _x;
} forEach (units _x);
_signed = [_x] call VEMFr_fnc_signAI;
[_x] ExecVM "exile_vemf_reloaded\sqf\signAI.sqf";
} forEach _paraGroups;
_players = nearestObjects [_flagPos, ["Exile_Unit_Player"], 275];
[[-1, "NEW BASE ATTACK", format["A para team is on the way to %1 @ %2's location!", _flagName, name _nearestPlayer]], _players] ExecVM "exile_vemf_reloaded\sqf\broadcast.sqf";

View File

@ -12,14 +12,12 @@
nothing
*/
[] spawn
{
uiNamespace setVariable ["VEMFrHcLoad", []];
uiNamespace setVariable ["VEMFrAIgroups", []];
while {true} do
{
_groups = uiNamespace getVariable "VEMFrAIgroups";
waitUntil { uiSleep 1; count _groups > 0 };
waitUntil {if (count _groups > 0) then {true} else {uiSleep 1; false} };
{
if (local _x) then
{
@ -30,9 +28,8 @@
if (count (units _x) > 0) then
{
// Group still has units, check if there is anyone that can be the owner
[_x] call VEMFr_fnc_transferOwner;
[_x] ExecVM "exile_vemf_reloaded\sqf\transferOwner.sqf";
};
};
} forEach _groups;
};
};