Unstable 0.1400.2.0 (a mimir edition)

This commit is contained in:
Markus Isberg
2021-05-28 19:04:09 +03:00
parent 5bc850cddb
commit 0b3fb5e440
126 changed files with 1623 additions and 787 deletions
@@ -19,12 +19,10 @@ namespace Barotrauma
{
character.WriteSpawnData(msg, character.ID, restrictMessageSize: false);
msg.Write(terroristCharacters.Contains(character));
List<Item> characterItems = characterDictionary[character];
// items must be written in a specific sequence so that child items aren't written before their parents
msg.Write((ushort)characterItems.Count());
foreach (Item item in characterItems)
msg.Write((ushort)characterItems[character].Count());
foreach (Item item in characterItems[character])
{
item.WriteSpawnData(msg, item.ID, item.ParentInventory.Owner?.ID ?? Entity.NullEntityID, 0);
item.WriteSpawnData(msg, item.ID, item.ParentInventory?.Owner?.ID ?? Entity.NullEntityID, 0);
}
}
}
@@ -19,12 +19,10 @@ namespace Barotrauma
foreach (Character character in characters)
{
character.WriteSpawnData(msg, character.ID, restrictMessageSize: false);
List<Item> characterItems = characterDictionary[character];
// items must be written in a specific sequence so that child items aren't written before their parents
msg.Write((ushort)characterItems.Count());
foreach (Item item in characterItems)
msg.Write((ushort)characterItems[character].Count());
foreach (Item item in characterItems[character])
{
item.WriteSpawnData(msg, item.ID, item.ParentInventory.Owner?.ID ?? Entity.NullEntityID, 0);
item.WriteSpawnData(msg, item.ID, item.ParentInventory?.Owner?.ID ?? Entity.NullEntityID, 0);
}
}
}