#301 Engine control in Power Monitor resetting.

This commit is contained in:
CrazyPants committed 2013-12-07 16:36:10 +08:00
1 parent a388f18ebb
commit a5d873cc1b
1 file changed
+8 -3
@@ -177,9 +177,14 @@ public class GuiPowerMonitor extends GuiScreenBase {
getInt(endTF) != te.asPercentInt(te.stopLevel)) {
te.engineControlEnabled = enabledB.isSelected();
te.startLevel = te.asPercentFloat(getInt(startTF));
te.stopLevel = te.asPercentFloat(getInt(endTF));
int i = getInt(startTF);
if(i >= 0) {
te.startLevel = te.asPercentFloat(i);
}
i = getInt(endTF);
if(i >= 0) {
te.stopLevel = te.asPercentFloat(i);
}
Packet pkt = PowerMonitorPacketHandler.createPowerMonitotPacket(te);
PacketDispatcher.sendPacketToServer(pkt);
}