Fixed some entities occasionally not being removed at the end of a round. CargoMission removed the cargo items at the end of a round without checking if the items have already been removed, which could cause another entity to be removed from the entity dictionary if it's taken the ID of the cargo item. This prevented the new entity from being removed in Entity.RemoveAll, causing errors during the next round. Closes #278
This commit is contained in:
@@ -196,7 +196,7 @@ namespace Barotrauma
|
||||
else if (entities.Entity is Character)
|
||||
{
|
||||
message.Write((byte)SpawnableType.Character);
|
||||
DebugConsole.NewMessage("WRITING CHARACTER DATA: " + (entities.Entity).ToString(),Color.Cyan);
|
||||
DebugConsole.NewMessage("WRITING CHARACTER DATA: " + (entities.Entity).ToString() + " (ID: " + entities.Entity.ID + ")", Color.Cyan);
|
||||
((Character)entities.Entity).WriteSpawnData(message);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user