Fixed issues with correct protocol implementation.

#issue[64] #fix #testmanual
This commit is contained in:
Calum
2017-09-25 22:09:26 +13:00
parent 5c50e77efa
commit 7027de80c4
6 changed files with 43 additions and 24 deletions
@@ -398,7 +398,11 @@ public class GameClient {
}
if (gameKeyBind.getKeyCode(KeyAction.SAILS_STATE) == e.getCode()) { // sails in/sails out
socketThread.sendBoatAction(BoatAction.SAILS_IN);
if (allBoatsMap.get(socketThread.getClientId()).getSailIn()) {
socketThread.sendBoatAction(BoatAction.SAILS_OUT);
} else {
socketThread.sendBoatAction(BoatAction.SAILS_IN);
}
allBoatsMap.get(socketThread.getClientId()).toggleSail();
} else if (gameKeyBind.getKeyCode(KeyAction.UPWIND) == e.getCode()
|| gameKeyBind.getKeyCode(KeyAction.DOWNWIND) == e.getCode()) {