diff --git a/exile_vemf_reloaded/missions/BaseAttack.sqf b/exile_vemf_reloaded/missions/BaseAttack.sqf index d1c2937..ad08f09 100644 --- a/exile_vemf_reloaded/missions/BaseAttack.sqf +++ b/exile_vemf_reloaded/missions/BaseAttack.sqf @@ -7,7 +7,7 @@ VEMFrMissionCount = VEMFrMissionCount + 1; _missionName = param [0, "", [""]]; -if isNil"VEMFrAttackCount" then { VEMFrAttackCount = 0 }; +if isNil "VEMFrAttackCount" then { VEMFrAttackCount = 0 }; VEMFrAttackCount = VEMFrAttackCount + 1; if (VEMFrAttackCount <= ([[_missionName],["maxAttacks"]] call VEMFr_fnc_getSetting select 0)) then { @@ -37,7 +37,7 @@ if (VEMFrAttackCount <= ([[_missionName],["maxAttacks"]] call VEMFr_fnc_getSetti _attackedFlags pushBack _flagToAttack; _flagPos = position _flagToAttack; _nearestPlayer = selectRandom (nearestObjects [_flagPos, ["Exile_Unit_Player"], 150]); - if not isNil"_nearestPlayer" then + if not isNil "_nearestPlayer" then { _flagName = _flagToAttack getVariable ["exileterritoryname", "ERROR: UNKNOWN NAME"]; _paraGroups = [_flagPos, _aiSetup select 0, _aiSetup select 1, ([[_missionName],["aiMode"]] call VEMFr_fnc_getSetting select 0), _missionName, 1000 + (random 1000), 150] call VEMFr_fnc_spawnVEMFrAI; @@ -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"; diff --git a/exile_vemf_reloaded/sqf/REMOTEguard.sqf b/exile_vemf_reloaded/sqf/REMOTEguard.sqf index aac5a0a..c3c4fe1 100644 --- a/exile_vemf_reloaded/sqf/REMOTEguard.sqf +++ b/exile_vemf_reloaded/sqf/REMOTEguard.sqf @@ -12,27 +12,24 @@ nothing */ -[] spawn -{ - uiNamespace setVariable ["VEMFrHcLoad", []]; - uiNamespace setVariable ["VEMFrAIgroups", []]; - while {true} do - { - _groups = uiNamespace getVariable "VEMFrAIgroups"; - waitUntil { uiSleep 1; count _groups > 0 }; - { - if (local _x) then +uiNamespace setVariable ["VEMFrHcLoad", []]; +uiNamespace setVariable ["VEMFrAIgroups", []]; +while {true} do + { + _groups = uiNamespace getVariable "VEMFrAIgroups"; + waitUntil {if (count _groups > 0) then {true} else {uiSleep 1; false} }; + { + if (local _x) then { - if ((count units _x) < 1) then - { - deleteGroup _x; - }; - 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; - }; + if ((count units _x) < 1) then + { + deleteGroup _x; + }; + if (count (units _x) > 0) then + { + // Group still has units, check if there is anyone that can be the owner + [_x] ExecVM "exile_vemf_reloaded\sqf\transferOwner.sqf"; + }; }; - } forEach _groups; - }; -}; + } forEach _groups; + }; diff --git a/exile_vemf_reloaded/sqf/handleRespectGain.sqf b/exile_vemf_reloaded/sqf/handleRespectGain.sqf index e94e102..441e86c 100644 --- a/exile_vemf_reloaded/sqf/handleRespectGain.sqf +++ b/exile_vemf_reloaded/sqf/handleRespectGain.sqf @@ -84,7 +84,7 @@ if not(isNull _target AND isNull _killer) then if _distanceOk then { _curRespect = _killer getVariable ["ExileScore", nil]; - if not(isNil"_curRespect") then + if not(isNil "_curRespect") then { _respectToGive = (((_message select 0) select 1) select 1); _newRespect = _curRespect + _respectToGive + _respectReward; diff --git a/exile_vemf_reloaded/sqf/missionTimer.sqf b/exile_vemf_reloaded/sqf/missionTimer.sqf index 825a73b..b776d99 100644 --- a/exile_vemf_reloaded/sqf/missionTimer.sqf +++ b/exile_vemf_reloaded/sqf/missionTimer.sqf @@ -24,7 +24,7 @@ if (_minNew > -1) then { _minFps = "minServerFPS" call VEMFr_fnc_getSetting; _minPlayers = "minPlayers" call VEMFr_fnc_getSetting; - if isNil"VEMFrForceStart" then { VEMFrForceStart = false }; + if isNil "VEMFrForceStart" then { VEMFrForceStart = false }; waitUntil { if ([_minPlayers] call VEMFr_fnc_playerCount AND diag_fps > _minFps OR VEMFrForceStart) then { true } else { uiSleep 5; false } }; if VEMFrForceStart then {