Fixed roundEnd not being called on the server

This commit is contained in:
EvilFactory
2023-10-19 15:27:17 -03:00
parent 3af538bd87
commit b5d89c8c7b

View File

@@ -2742,6 +2742,15 @@ namespace Barotrauma.Networking
GameMain.GameSession.EndRound(endMessage);
}
TraitorManager.TraitorResults? traitorResults = traitorManager?.GetEndResults() ?? null;
var result = GameMain.LuaCs.Hook.Call<List<object>>("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;