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:
parent
25cd8eb989
commit
b68a033b4c
14 changed files with 157 additions and 10 deletions
|
|
@ -36,7 +36,7 @@ namespace src.player.skills
|
|||
if (victim.Index == attacker.Index || victim.Team == attacker.Team)
|
||||
return;
|
||||
|
||||
var attackerInfo = PlayerManager.GetPlayerByIndex(PlayerManager.GetPlayerEvent(attacker)!.Index);
|
||||
var attackerInfo = PlayerManager.GetPlayerByIndex((PlayerManager.GetPlayerEvent(attacker)?.Index ?? attacker.Index));
|
||||
if (attackerInfo?.Skill != skillName) return;
|
||||
|
||||
SkillUtils.TakeHealth(victim!.PlayerPawn.Value, SkillsInfo.GetValue<int>(skillName, "damageDeal"));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue