(5218c43a0) Server sends the IDs of both selected characters and selected items to the clients. Previously this wasn't needed, because it wasn't possible to have both a character and an item selected at the same time. Fixes characters floating mid-air client-side when dragging others up stairs, and probably some other undiscovered bugs as well.

This commit is contained in:
Joonas Rikkonen
2019-04-01 22:50:11 +03:00
parent ae6b797d73
commit d511ecd4e3
7 changed files with 97 additions and 70 deletions
@@ -362,7 +362,8 @@ namespace Barotrauma
if (SelectedCharacter != null || SelectedConstruction != null)
{
tempBuffer.Write(true);
tempBuffer.Write(SelectedCharacter != null ? SelectedCharacter.ID : SelectedConstruction.ID);
tempBuffer.Write(SelectedCharacter != null ? SelectedCharacter.ID : NullEntityID);
tempBuffer.Write(SelectedConstruction != null ? SelectedConstruction.ID : NullEntityID);
if (SelectedCharacter != null)
{
tempBuffer.Write(AnimController.Anim == AnimController.Animation.CPR);