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

@@ -412,6 +412,8 @@ namespace Barotrauma.Networking
bool myCharacter = i >= clients.Count;
var character = Character.Create(characterInfos[i], shuttleSpawnPoints[i].WorldPosition, !myCharacter, false);
Entity.Spawner.AddToSpawnedList(character);
character.TeamID = 1;
if (myCharacter)
@@ -424,9 +426,7 @@ namespace Barotrauma.Networking
{
clients[i].Character = character;
}
spawnedCharacters.Add(character);
Vector2 pos = cargoSp == null ? character.Position : cargoSp.Position;
if (divingSuitPrefab != null && oxyPrefab != null)
@@ -450,10 +450,11 @@ namespace Barotrauma.Networking
spawnedItems.Add(scooter);
spawnedItems.Add(battery);
}
spawnedItems.ForEach(s => Item.Spawner.AddToSpawnedList(s));
character.GiveJobItems(mainSubSpawnPoints[i]);
Entity.Spawner.AddToSpawnedList(character.SpawnItems);
Entity.Spawner.AddToSpawnedList(spawnedItems);
GameMain.GameSession.CrewManager.characters.Add(character);
}