Fix GeoLite crash, add PerfMode profiling, reload cache invalidation

- GeoLite/MaxMind lookup wrapped in try/catch and disabled for the session on failure
  (stops the per-tick exception spam when the assembly cannot load during hot-reload)
- New PerfMode config option: writes performance logs to logs/perf_<date>.txt
  (DisableAll/SetSkill/PlayerDeath totals, per-skill SkillAction timings,
  aggregated OnTick/CheckTransmit avg-max summaries)
- css_reload now invalidates the skill-info and freeze-time caches
- Removed the last null-forgiving player lookups (Command, Armored, Baseball,
  FriendlyFire, OneShot)
This commit is contained in:
ByDexter 2026-07-06 02:50:56 +03:00
parent 25cd8eb989
commit b68a033b4c
14 changed files with 157 additions and 10 deletions

View file

@ -17,11 +17,13 @@ namespace src.player
UpdateGameRules();
if (Server.TickCount % 2 != 0) return;
long perfStart = PerfLog.Start();
foreach (var player in Utilities.GetPlayers())
{
if (player != null && player.IsValid)
UpdatePlayerHud(player);
}
PerfLog.Sample("OnTick(hud)", perfStart);
});
Instance.RegisterListener<OnMapStart>(OnMapStart);