Skip to content

Commit

Permalink
Lifecycle: Reduce RPT Spam (#194)
Browse files Browse the repository at this point in the history
reduce rpt spam
  • Loading branch information
BrettMayson authored Mar 11, 2024
1 parent 7ae6688 commit 7491d13
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
3 changes: 3 additions & 0 deletions addons/lifecycle/XEH_preInit.sqf
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,8 @@ GVAR(excludedParentClasses) = [
"Land_i_Barracks_V1_F" // yes, is parent for others!
];

GVAR(shouldWarnSpawnAbstain) = true;
GVAR(shouldWarnDespawnAbstain) = true;

[] call FUNC(initConfig);

7 changes: 5 additions & 2 deletions addons/lifecycle/functions/fnc_localSpawnPass.sqf
Original file line number Diff line number Diff line change
@@ -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(shouldWarnSpawnAbstain))) exitWith {
INFO("no human players connected, will abstain from spawning civilians");
GVAR(shouldWarnSpawnAbstain) = false;
};

GVAR(shouldWarnSpawnAbstain) = true;

private _minCivUpdateTime = GVAR(minCivUpdateTime);
private _minFps = GVAR(minCivOwnerFps);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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}

0 comments on commit 7491d13

Please sign in to comment.