Fixed AI characters constantly flipping over the X-axis when inside, fixed clients not receiving a msg about characters spawned by RespawnManager

This commit is contained in:
Regalis
2017-01-07 16:51:51 +02:00
parent 6364915353
commit 44cbd0d9bf
5 changed files with 23 additions and 16 deletions

View File

@@ -152,6 +152,18 @@ namespace Barotrauma
NetStateID = (UInt32)spawnHistory.Count;
}
public void AddToSpawnedList(IEnumerable<Entity> entities)
{
if (GameMain.Server == null) return;
if (entities == null) return;
foreach (Entity entity in entities)
{
spawnHistory.Add(new SpawnOrRemove(entity, false));
NetStateID = (UInt32)spawnHistory.Count;
}
}
public void ServerWrite(Lidgren.Network.NetBuffer message, Client client, object[] extraData = null)
{
if (GameMain.Server == null) return;