mirror of
https://github.com/simon987/Much-Assembly-Required.git
synced 2025-04-19 18:46:43 +00:00
fixed incorrect value being used in actually jumping
This commit is contained in:
parent
95f4af1683
commit
a3064ef8d6
@ -69,7 +69,7 @@ public class Cubot extends GameObject implements Updatable, ControllableUnit, Pr
|
||||
currentAction = Action.IDLE;
|
||||
}
|
||||
} else if (currentAction == Action.JUMPING) {
|
||||
if (spendEnergy(jumpDistance * 200)) {
|
||||
if (spendEnergy(jumpDistance * 300)) {
|
||||
if (!incrementLocation(jumpDistance)) {
|
||||
//Couldn't jump
|
||||
currentAction = Action.IDLE;
|
||||
|
@ -69,7 +69,7 @@ public class CubotLeg extends CpuHardware implements JSONSerialisable {
|
||||
cubot.setCurrentAction(Action.WALKING);
|
||||
}
|
||||
} 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) {
|
||||
cubot.setJumpDistance(b);
|
||||
cubot.setCurrentAction(Action.JUMPING);
|
||||
|
Loading…
x
Reference in New Issue
Block a user