v1.2.3.b8 - fix: startup crash with PerfMode/DebugMode enabled

- #### Fixes
    - **Startup crash** - Servers with `PerfMode` or `DebugMode` enabled crashed during boot at the first skill. `PerfLog.Sample` called `IsServerIdle()` on every `SkillAction`, which scanned the player list while the server was still booting. Our own regression, introduced with the idle-logging gate in b8.
    - **PlayerManager** - Added a `serverActive` flag set on map start; `IsServerIdle`, `GetTickPlayers` and `GetTickBomb` no longer touch the game before the map is up.
    - **Commands** - `zmienmape` and one Chinese alias were listed twice, registering the same command name natively two times. Cleaned up the defaults and added a duplicate guard so user configs are covered too.

- #### Chat
    - **Skill announcement** - Teammate skills are now shown first and your own skill description last, so it stays at the bottom of the chat instead of scrolling away.
    - **SetRandomSkill** - No longer leaves the chat box unclosed when the player has teammates.
This commit is contained in:
ByDexter 2026-08-21 10:34:22 +03:00
parent 11f51b596c
commit b95c52028e
8 changed files with 33 additions and 15 deletions

View file

@ -62,8 +62,9 @@ namespace src.command
foreach (var commandPair in commands)
foreach (var command in commandPair.Key)
{
Instance.AddCommand($"css_{command}", commandPair.Value.description, commandPair.Value.handler);
oldCommands.TryAdd($"css_{command}", commandPair.Value.handler);
string name = $"css_{command}";
if (!oldCommands.TryAdd(name, commandPair.Value.handler)) continue;
Instance.AddCommand(name, commandPair.Value.description, commandPair.Value.handler);
}
}
}