/* */ package NET.worlds.console; /* */ /* */ import NET.worlds.scape.Drone; /* */ import NET.worlds.scape.HoloPilot; /* */ import java.io.DataInputStream; /* */ import java.io.DataOutputStream; /* */ import java.io.IOException; /* */ /* */ public class BBDroneDeltaPosCommand extends BlackBoxCommand /* */ { /* */ private byte dx; /* */ private byte dy; /* */ private byte dyaw; /* */ private String droneID; /* */ /* */ public BBDroneDeltaPosCommand() /* */ { /* 18 */ this.commandType = 8; /* */ } /* */ /* */ public BBDroneDeltaPosCommand(String pdroneID, byte pdx, byte pdy, byte pdyaw) /* */ { /* 23 */ this(); /* 24 */ this.droneID = pdroneID; /* 25 */ this.dx = pdx; /* 26 */ this.dy = pdy; /* 27 */ this.dyaw = pdyaw; /* */ } /* */ /* */ public boolean execute() /* */ { /* 32 */ Drone id = null; /* */ /* 34 */ if (this.droneID.equals("@Pilot")) { /* 35 */ NET.worlds.scape.Pilot p = NET.worlds.scape.Pilot.getActive(); /* 36 */ if ((p != null) && /* 37 */ ((p instanceof HoloPilot))) { /* 38 */ HoloPilot hp = (HoloPilot)p; /* 39 */ Drone d = hp.getInternalDrone(); /* 40 */ if ((d != null) && /* 41 */ ((d instanceof Drone))) { /* 42 */ id = d; /* */ } /* */ } /* */ } /* */ else /* */ { /* 48 */ id = ArmyOfZombies.instance().get(this.droneID); /* */ } /* */ /* 51 */ if (id != null) { /* 52 */ id.shortLoc(this.dx, this.dy, this.dyaw); /* 53 */ doCallback(true); /* 54 */ return true; /* */ } /* */ /* 57 */ doCallback(true); /* 58 */ return true; /* */ } /* */ /* */ public void save(DataOutputStream dos) throws IOException /* */ { /* 63 */ super.save(dos); /* 64 */ dos.writeUTF(this.droneID); /* 65 */ dos.writeByte(this.dx); /* 66 */ dos.writeByte(this.dy); /* 67 */ dos.writeByte(this.dyaw); /* */ } /* */ /* */ public void load(DataInputStream dis) throws IOException /* */ { /* 72 */ super.load(dis); /* 73 */ this.droneID = dis.readUTF(); /* 74 */ this.dx = dis.readByte(); /* 75 */ this.dy = dis.readByte(); /* 76 */ this.dyaw = dis.readByte(); /* */ } /* */ } /* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BBDroneDeltaPosCommand.class * Java compiler version: 6 (50.0) * JD-Core Version: 0.7.1 */