Fixed jetpack not draining energy without flight control

This commit is contained in:
MachineMuse 2013-04-18 20:56:42 -06:00
parent 84dfcbd61b
commit 5722007f2c

View file

@ -199,7 +199,6 @@ public class PlayerTickHandler implements ITickHandler {
player.motionZ += vz;
totalEnergyDrain += jetEnergy * (vx * vx + vy * vy + vz * vz);
ElectricItemUtils.drainPlayerEnergy(player, totalEnergyDrain);
} else {
Vec3 playerHorzFacing = player.getLookVec();
playerHorzFacing.yCoord = 0;
@ -225,6 +224,7 @@ public class PlayerTickHandler implements ITickHandler {
player.motionX *= ratio;
player.motionZ *= ratio;
}
ElectricItemUtils.drainPlayerEnergy(player, totalEnergyDrain);
}
public static double getWeightPenaltyRatio(double currentWeight, double capacity) {