(52748e937) Fixed nullref exception if a character eats another one when a gamesession has not been started

This commit is contained in:
Joonas Rikkonen
2019-04-01 22:53:12 +03:00
parent ae3dea40b0
commit 98e0504e1f
4 changed files with 41 additions and 42 deletions
@@ -656,6 +656,13 @@ namespace Barotrauma
msg.Timer -= deltaTime;
msg.Pos += msg.Velocity * deltaTime;
}
foreach (GUIMessage msg in messages)
{
if (!msg.WorldSpace) continue;
msg.Timer -= deltaTime;
msg.Pos += msg.Velocity * deltaTime;
}
}
messages.RemoveAll(m => m.Timer <= 0.0f);