add catch code for previous commit :(

This commit is contained in:
NotAlwaysTrue
2025-12-22 22:54:33 +08:00
parent dadd6c598f
commit 1def7b7b8d
3 changed files with 10 additions and 2 deletions

View File

@@ -1233,9 +1233,9 @@ namespace Barotrauma.Networking
}
}
}
finally
catch
{
errorLines.Add("Catch event snapshot failed.");
errorLines.Add("Failed to write EntitySpawner events.");
}
errorLines.Add("");

View File

@@ -293,6 +293,10 @@ namespace Barotrauma
GameMain.Server.EntityEventManager.Events.RemoveAll(ev => ev.Entity == item);
}
}
catch
{
GameServer.Log("Try making UniqueEvents snapshot failed", ServerLog.MessageType.Warning);
}
finally
{
Entity.Spawner.CreateNetworkEvent(new EntitySpawner.SpawnEntity(item));

View File

@@ -181,6 +181,10 @@ namespace Barotrauma
GameMain.Server.EntityEventManager.Events.RemoveAll(ev => ev.Entity == item);
}
}
catch
{
GameServer.Log("Try making UniqueEvents snapshot failed", ServerLog.MessageType.Warning);
}
finally
{
Entity.Spawner.CreateNetworkEvent(new EntitySpawner.SpawnEntity(item));