Unstable 0.16.2.0

This commit is contained in:
Markus Isberg
2022-02-02 00:55:02 +09:00
parent b259af5911
commit 6814a11520
106 changed files with 1634 additions and 793 deletions
@@ -7,6 +7,26 @@ namespace Barotrauma.Items.Components
public void ServerWrite(IWriteMessage msg, Client c, object[] extraData = null)
{
msg.Write(Snapped);
if (!Snapped)
{
msg.Write(target?.ID ?? Entity.NullEntityID);
if (source is Entity entity && !entity.Removed)
{
msg.Write(entity?.ID ?? Entity.NullEntityID);
msg.Write((byte)0);
}
else if (source is Limb limb && limb.character != null && !limb.character.Removed)
{
msg.Write(limb.character?.ID ?? Entity.NullEntityID);
msg.Write((byte)limb.character.AnimController.Limbs.IndexOf(limb));
}
else
{
msg.Write(Entity.NullEntityID);
msg.Write((byte)0);
}
}
}
}
}