From bd12b4c50a05218b2f86436bd6a0ee95f35d4e50 Mon Sep 17 00:00:00 2001 From: Treeku Date: Wed, 4 Jun 2014 05:42:13 +0100 Subject: [PATCH] Added locomotion state checking to commands --- src/services/command/CommandService.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/services/command/CommandService.java b/src/services/command/CommandService.java index 9435a0ea..b7359d8f 100644 --- a/src/services/command/CommandService.java +++ b/src/services/command/CommandService.java @@ -105,14 +105,12 @@ public class CommandService implements INetworkDispatch { } } - // This SHOULD be invalid locomotions but we don't track these currently. - // Postures are the best we can do. - for (byte posture : command.getInvalidPostures()) { - if (actor.getPosture() == posture) { - //return false; + for (byte locomotion : command.getInvalidLocomotions()) { + if (actor.getLocomotion() == locomotion) { + return false; } } - + switch (command.getTargetType()) { case 0: // Target Not Used For This Command break;