(f0d812055) v0.9.9.0

This commit is contained in:
Joonas Rikkonen
2020-04-23 19:19:37 +03:00
parent b647059b93
commit ac37a3b0e4
391 changed files with 15054 additions and 5420 deletions
@@ -9,7 +9,7 @@ namespace Barotrauma
msg.Write((ushort)items.Count);
foreach (Item item in items)
{
item.WriteSpawnData(msg, item.ID);
item.WriteSpawnData(msg, item.ID, item.ParentInventory?.Owner?.ID ?? 0);
}
}
}
@@ -75,8 +75,8 @@ namespace Barotrauma
}
else
{
teamDead[0] = crews[0].All(c => c.IsDead || c.IsUnconscious);
teamDead[1] = crews[1].All(c => c.IsDead || c.IsUnconscious);
teamDead[0] = crews[0].All(c => c.IsDead || c.IsIncapacitated);
teamDead[1] = crews[1].All(c => c.IsDead || c.IsIncapacitated);
}
if (state == 0)
@@ -1,12 +1,32 @@
using Barotrauma.Networking;
using System.Collections.Generic;
namespace Barotrauma
{
partial class SalvageMission : Mission
partial class SalvageMission : Mission
{
private bool usedExistingItem;
private readonly List<Pair<int, int>> executedEffectIndices = new List<Pair<int, int>>();
public override void ServerWriteInitial(IWriteMessage msg, Client c)
{
item.WriteSpawnData(msg, item.ID);
msg.Write(usedExistingItem);
if (usedExistingItem)
{
msg.Write(item.ID);
}
else
{
item.WriteSpawnData(msg, item.ID, item.ParentInventory?.Owner?.ID ?? 0);
}
msg.Write((byte)executedEffectIndices.Count);
foreach (Pair<int, int> effectIndex in executedEffectIndices)
{
msg.Write((byte)effectIndex.First);
msg.Write((byte)effectIndex.Second);
}
}
}
}