Fixed NRE when calling receive in singleplayer (should just do nothing)

This commit is contained in:
EvilFactory
2023-02-01 15:27:11 -03:00
parent ca9f232aaf
commit 1023ca2062

View File

@@ -74,6 +74,8 @@ namespace Barotrauma
{
if (stringToId.ContainsKey(netMessageName)) { return; }
if (GameMain.Client == null) { return; }
WriteOnlyMessage message = new WriteOnlyMessage();
message.WriteByte((byte)ClientPacketHeader.LUA_NET_MESSAGE);
message.WriteByte((byte)LuaCsClientToServer.RequestSingleId);