From a85611fcf9fccdda155a975154f0bbd79d73a358 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Sun, 10 Mar 2024 19:18:28 -0600 Subject: [PATCH 1/2] reduce rpt spam --- addons/lifecycle/XEH_preInit.sqf | 3 +++ addons/lifecycle/functions/fnc_localSpawnPass.sqf | 7 +++++-- .../fnc_sm_lifecycle_trans_life_despawn_condition.sqf | 6 +++++- 3 files changed, 13 insertions(+), 3 deletions(-) diff --git a/addons/lifecycle/XEH_preInit.sqf b/addons/lifecycle/XEH_preInit.sqf index 4ce8fef3..2dff6407 100644 --- a/addons/lifecycle/XEH_preInit.sqf +++ b/addons/lifecycle/XEH_preInit.sqf @@ -30,5 +30,8 @@ GVAR(excludedParentClasses) = [ "Land_i_Barracks_V1_F" // yes, is parent for others! ]; +GVAR(shouldWarnSpawnPass) = true; +GVAR(shouldWarnDespawnAbstain) = true; + [] call FUNC(initConfig); diff --git a/addons/lifecycle/functions/fnc_localSpawnPass.sqf b/addons/lifecycle/functions/fnc_localSpawnPass.sqf index b9b0f2e2..57a65230 100644 --- a/addons/lifecycle/functions/fnc_localSpawnPass.sqf +++ b/addons/lifecycle/functions/fnc_localSpawnPass.sqf @@ -1,9 +1,12 @@ #include "..\script_component.hpp" -if ((ALL_HUMAN_PLAYERS isEqualTo []) && (GVAR(spawnOnlyWithPlayers))) exitWith { - INFO("no human players connected, will abstain from spawning civilians") +if ((ALL_HUMAN_PLAYERS isEqualTo []) && (GVAR(spawnOnlyWithPlayers)) && (GVAR(shouldWarnSpawnPass))) exitWith { + INFO("no human players connected, will abstain from spawning civilians"); + GVAR(shouldWarnSpawnPass) = false; }; +GVAR(shouldWarnSpawnPass) = true; + private _minCivUpdateTime = GVAR(minCivUpdateTime); private _minFps = GVAR(minCivOwnerFps); diff --git a/addons/lifecycle/functions/fnc_sm_lifecycle_trans_life_despawn_condition.sqf b/addons/lifecycle/functions/fnc_sm_lifecycle_trans_life_despawn_condition.sqf index ad32d8d7..faf1b039 100644 --- a/addons/lifecycle/functions/fnc_sm_lifecycle_trans_life_despawn_condition.sqf +++ b/addons/lifecycle/functions/fnc_sm_lifecycle_trans_life_despawn_condition.sqf @@ -20,8 +20,12 @@ if ((count ALL_HUMAN_PLAYERS > 0) || (GVAR(spawnOnlyWithPlayers))) then { INFO_1("despawning civ %1 based on distance", _this); _tooDistantFromPlayers = true; }; + GVAR(shouldWarnDespawnAbstain) = true; } else { - INFO("no human players connected, but civs allowed - will abstain from despawning civilians based on player distance"); + if (GVAR(shouldWarnDespawnAbstain)) then { + INFO("no human players connected, but civs allowed - will abstain from despawning civilians based on player distance"); + GVAR(shouldWarnDespawnAbstain) = false; + }; }; _tooDistantFromPlayers || {_this call _despawnCondition} From b7d072a75fa2bef5012f2148ee388225d8a67386 Mon Sep 17 00:00:00 2001 From: BrettMayson Date: Sun, 10 Mar 2024 19:20:25 -0600 Subject: [PATCH 2/2] can be consistent --- addons/lifecycle/XEH_preInit.sqf | 2 +- addons/lifecycle/functions/fnc_localSpawnPass.sqf | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/addons/lifecycle/XEH_preInit.sqf b/addons/lifecycle/XEH_preInit.sqf index 2dff6407..94794673 100644 --- a/addons/lifecycle/XEH_preInit.sqf +++ b/addons/lifecycle/XEH_preInit.sqf @@ -30,7 +30,7 @@ GVAR(excludedParentClasses) = [ "Land_i_Barracks_V1_F" // yes, is parent for others! ]; -GVAR(shouldWarnSpawnPass) = true; +GVAR(shouldWarnSpawnAbstain) = true; GVAR(shouldWarnDespawnAbstain) = true; [] call FUNC(initConfig); diff --git a/addons/lifecycle/functions/fnc_localSpawnPass.sqf b/addons/lifecycle/functions/fnc_localSpawnPass.sqf index 57a65230..35c6c7ae 100644 --- a/addons/lifecycle/functions/fnc_localSpawnPass.sqf +++ b/addons/lifecycle/functions/fnc_localSpawnPass.sqf @@ -1,11 +1,11 @@ #include "..\script_component.hpp" -if ((ALL_HUMAN_PLAYERS isEqualTo []) && (GVAR(spawnOnlyWithPlayers)) && (GVAR(shouldWarnSpawnPass))) exitWith { +if ((ALL_HUMAN_PLAYERS isEqualTo []) && (GVAR(spawnOnlyWithPlayers)) && (GVAR(shouldWarnSpawnAbstain))) exitWith { INFO("no human players connected, will abstain from spawning civilians"); - GVAR(shouldWarnSpawnPass) = false; + GVAR(shouldWarnSpawnAbstain) = false; }; -GVAR(shouldWarnSpawnPass) = true; +GVAR(shouldWarnSpawnAbstain) = true; private _minCivUpdateTime = GVAR(minCivUpdateTime); private _minFps = GVAR(minCivOwnerFps);