fixed incorrect value being used in actually jumping

This commit is contained in:
Jaggernaut555 2018-01-02 13:50:22 -08:00
parent 95f4af1683
commit a3064ef8d6
2 changed files with 2 additions and 2 deletions

View File

@ -69,7 +69,7 @@ public class Cubot extends GameObject implements Updatable, ControllableUnit, Pr
currentAction = Action.IDLE; currentAction = Action.IDLE;
} }
} else if (currentAction == Action.JUMPING) { } else if (currentAction == Action.JUMPING) {
if (spendEnergy(jumpDistance * 200)) { if (spendEnergy(jumpDistance * 300)) {
if (!incrementLocation(jumpDistance)) { if (!incrementLocation(jumpDistance)) {
//Couldn't jump //Couldn't jump
currentAction = Action.IDLE; currentAction = Action.IDLE;

View File

@ -69,7 +69,7 @@ public class CubotLeg extends CpuHardware implements JSONSerialisable {
cubot.setCurrentAction(Action.WALKING); cubot.setCurrentAction(Action.WALKING);
} }
} else if (a == LEGS_JUMP) { } else if (a == LEGS_JUMP) {
// jump up to 3 spaces, each space costs 200 // jump up to 3 spaces, each space costs 300
if (b < 4 && cubot.getMaxEnergy() >= b * 300) { if (b < 4 && cubot.getMaxEnergy() >= b * 300) {
cubot.setJumpDistance(b); cubot.setJumpDistance(b);
cubot.setCurrentAction(Action.JUMPING); cubot.setCurrentAction(Action.JUMPING);