Fixed IsKeyHit (ladder climbing being inconsistent) + optimized interaction syncing

Instead of sending over mouse position as two floats (8 bytes total), the game will send the aim angle represented as a short (0 to 65535, so it's fairly precise) and the selected item ID (up to 4 bytes total, 2 bytes if it's only one of the inputs).

The problem with IsKeyHit is that it checked when the player started a key press, when it should've been checking for the key being released.
This commit is contained in:
juanjp600
2017-01-09 15:06:19 -03:00
parent a75ef8ee51
commit cfeb720836
3 changed files with 83 additions and 37 deletions

View File

@@ -832,7 +832,7 @@ namespace Barotrauma
trigger = character.SelectedConstruction.TransformTrigger(trigger);
bool notClimbing = false;
if (character.IsRemotePlayer)
if (character.IsRemotePlayer && GameMain.Server == null)
{
notClimbing = character.IsKeyDown(InputType.Left) || character.IsKeyDown(InputType.Right);
}