diff --git a/Missionframework/scripts/server/battlegroup/counter_battlegroup.sqf b/Missionframework/scripts/server/battlegroup/counter_battlegroup.sqf index 1af5708f..905f0304 100644 --- a/Missionframework/scripts/server/battlegroup/counter_battlegroup.sqf +++ b/Missionframework/scripts/server/battlegroup/counter_battlegroup.sqf @@ -35,7 +35,7 @@ while { GRLIB_csat_aggressivity >= 0.9 && GRLIB_endgame == 0 } do { _target_player = _x; }; - } foreach allPlayers; + } foreach (allPlayers - entities "HeadlessClient_F"); if (!(isNull _target_player)) then { _target_pos = [99999, getpos _target_player ] call F_getNearestSector; diff --git a/Missionframework/scripts/server/battlegroup/random_battlegroups.sqf b/Missionframework/scripts/server/battlegroup/random_battlegroups.sqf index 0f3af43f..707dca47 100644 --- a/Missionframework/scripts/server/battlegroup/random_battlegroups.sqf +++ b/Missionframework/scripts/server/battlegroup/random_battlegroups.sqf @@ -16,7 +16,7 @@ while { GRLIB_csat_aggressivity > 0.9 && GRLIB_endgame == 0 } do { waitUntil { sleep 5; time > ( GRLIB_last_battlegroup_time + ( 2100 / GRLIB_csat_aggressivity ) ) }; }; - if ( (count allPlayers >= (10 / GRLIB_csat_aggressivity) ) && ([] call F_opforCap < GRLIB_battlegroup_cap) && (combat_readiness >= 70) && (diag_fps > 15.0)) then { + if ((count (allPlayers - entities "HeadlessClient_F") >= (10 / GRLIB_csat_aggressivity)) && ([] call F_opforCap < GRLIB_battlegroup_cap) && (combat_readiness >= 70) && (diag_fps > 15.0)) then { [] spawn spawn_battlegroup; }; -}; \ No newline at end of file +}; diff --git a/Missionframework/scripts/server/resources/manage_logistics.sqf b/Missionframework/scripts/server/resources/manage_logistics.sqf index 73c59cae..29872533 100644 --- a/Missionframework/scripts/server/resources/manage_logistics.sqf +++ b/Missionframework/scripts/server/resources/manage_logistics.sqf @@ -8,7 +8,7 @@ KP_liberation_convoy_ambush_check = 0; while {GRLIB_endgame == 0} do { - if (((count allPlayers) > 0) && ((count KP_liberation_logistics) > 0)) then { + if (((count (allPlayers - entities "HeadlessClient_F")) > 0) && ((count KP_liberation_logistics) > 0)) then { if (KP_liberation_logistic_debug > 0) then {diag_log format ["[KP LIBERATION] [LOGISTIC] Logistic interval started: %1", time];}; private _tempLogistics = +KP_liberation_logistics; diff --git a/Missionframework/scripts/server/resources/manage_resources.sqf b/Missionframework/scripts/server/resources/manage_resources.sqf index 8b055d1d..f10bf822 100644 --- a/Missionframework/scripts/server/resources/manage_resources.sqf +++ b/Missionframework/scripts/server/resources/manage_resources.sqf @@ -10,7 +10,7 @@ while {GRLIB_endgame == 0} do { recalculate_sectors = false; - if (((count allPlayers) > 0) && ((count KP_liberation_production) > 0)) then { + if (((count (allPlayers - entities "HeadlessClient_F")) > 0) && ((count KP_liberation_production) > 0)) then { waitUntil {sleep 0.5; !sectors_recalculating}; sectors_recalculating = true; diff --git a/Missionframework/scripts/shared/functions/F_adaptiveOpforFactor.sqf b/Missionframework/scripts/shared/functions/F_adaptiveOpforFactor.sqf index db3915f7..8c8ca906 100644 --- a/Missionframework/scripts/shared/functions/F_adaptiveOpforFactor.sqf +++ b/Missionframework/scripts/shared/functions/F_adaptiveOpforFactor.sqf @@ -2,7 +2,7 @@ private _ratio = 1.0; if (GRLIB_adaptive_opfor) then { private _bluforcount = 0.2 * (GRLIB_side_friendly countSide allUnits); - _bluforcount = _bluforcount + (count allPlayers); + _bluforcount = _bluforcount + (count (allPlayers - entities "HeadlessClient_F")); _ratio = 0.5 + (_bluforcount / 25.0); diff --git a/README.md b/README.md index 3e129aa7..9f8fc72f 100644 --- a/README.md +++ b/README.md @@ -166,9 +166,9 @@ class Missions * Added: Fog removal script readded, as some people had issues with too much fog after some time. * Tweaked: Weather module is also loaded, even with ACE running. (ACE doesn't control weather completely anymore) * Tweaked: Disabled script that switched locality of all blufor units to the commander machine. (should fix UAV issue) +* Tweaked: `allPlayers` replaced with `(allPlayers - entities "HeadlessClient_F")` for scripts which should pause when no players are online. (logistic, resources, battlegroups) * Fixed: Annoying popup since A3 1.90 concerning missing entry for `widthRailWay`. - ### 0.963a (10th April 2018 as "legacy support" release) * Added: Action to raise/lower object while building. Thanks to [darrell-aevum](https://github.com/darrell-aevum) * Added: Some classnames to arsenal allowed extension list. Thanks to [madpat3](https://github.com/madpat3)