From b5d89c8c7b0972f125398a1985c2e201359e5513 Mon Sep 17 00:00:00 2001 From: EvilFactory Date: Thu, 19 Oct 2023 15:27:17 -0300 Subject: [PATCH] Fixed roundEnd not being called on the server --- .../ServerSource/Networking/GameServer.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs b/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs index e1cafb216..ae31f60ac 100644 --- a/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs +++ b/Barotrauma/BarotraumaServer/ServerSource/Networking/GameServer.cs @@ -2742,6 +2742,15 @@ namespace Barotrauma.Networking GameMain.GameSession.EndRound(endMessage); } TraitorManager.TraitorResults? traitorResults = traitorManager?.GetEndResults() ?? null; + var result = GameMain.LuaCs.Hook.Call>("roundEnd"); + if (result != null) + { + foreach (var data in result) + { + if (data is TraitorManager.TraitorResults traitorResultData) { traitorResults = traitorResultData; } + if (data is string endMessageData) { endMessage = endMessageData; } + } + } endRoundTimer = 0.0f;