Fixed incorrectly length in character position updates (1 bit off), clients read pad bits in position updates
This commit is contained in:
@@ -455,6 +455,8 @@ namespace Barotrauma
|
||||
tempBuffer.Write(SimPosition.X);
|
||||
tempBuffer.Write(SimPosition.Y);
|
||||
|
||||
tempBuffer.WritePadBits();
|
||||
|
||||
msg.Write((byte)tempBuffer.LengthBytes);
|
||||
msg.Write(tempBuffer);
|
||||
}
|
||||
|
||||
@@ -932,6 +932,7 @@ namespace Barotrauma.Networking
|
||||
//force to the correct position in case the entity doesn't exist
|
||||
//or the message wasn't read correctly for whatever reason
|
||||
inc.Position = msgEndPos;
|
||||
inc.ReadPadBits();
|
||||
break;
|
||||
case ServerNetObject.ENTITY_EVENT:
|
||||
case ServerNetObject.ENTITY_EVENT_INITIAL:
|
||||
|
||||
Reference in New Issue
Block a user