EntitySpawner only writes a limited number of entities per packet

This commit is contained in:
Regalis
2017-03-26 17:19:21 +03:00
parent 52dde81396
commit 3306a1ab96
2 changed files with 19 additions and 12 deletions

View File

@@ -54,7 +54,7 @@ namespace Barotrauma.Networking
public void Write(NetOutgoingMessage msg, NetConnection serverConnection)
{
if (events.Count == 0) return;
if (events.Count == 0 || serverConnection == null) return;
List<NetEntityEvent> eventsToSync = new List<NetEntityEvent>();