diff options
Diffstat (limited to 'NET/worlds/console/BBMoveDroneCommand.java')
| -rw-r--r-- | NET/worlds/console/BBMoveDroneCommand.java | 86 |
1 files changed, 86 insertions, 0 deletions
diff --git a/NET/worlds/console/BBMoveDroneCommand.java b/NET/worlds/console/BBMoveDroneCommand.java new file mode 100644 index 0000000..ec775fc --- /dev/null +++ b/NET/worlds/console/BBMoveDroneCommand.java @@ -0,0 +1,86 @@ +/* */ package NET.worlds.console; +/* */ +/* */ import NET.worlds.scape.Drone; +/* */ import NET.worlds.scape.HoloPilot; +/* */ import java.io.DataInputStream; +/* */ import java.io.DataOutputStream; +/* */ +/* */ public class BBMoveDroneCommand extends BlackBoxCommand +/* */ { +/* */ private short x; +/* */ private short y; +/* */ private short z; +/* */ private short dir; +/* */ private String droneID; +/* */ +/* */ public BBMoveDroneCommand() +/* */ { +/* 18 */ this.commandType = 3; +/* */ } +/* */ +/* */ public BBMoveDroneCommand(String pdroneID, short px, short py, short pz, short pdir) +/* */ { +/* 23 */ this(); +/* 24 */ this.droneID = pdroneID; +/* 25 */ this.x = px; +/* 26 */ this.y = py; +/* 27 */ this.z = pz; +/* 28 */ this.dir = pdir; +/* */ } +/* */ +/* */ public boolean execute() +/* */ { +/* 33 */ Drone id = null; +/* */ +/* 35 */ if (this.droneID.equals("@Pilot")) { +/* 36 */ NET.worlds.scape.Pilot p = NET.worlds.scape.Pilot.getActive(); +/* 37 */ if ((p != null) && +/* 38 */ ((p instanceof HoloPilot))) { +/* 39 */ HoloPilot hp = (HoloPilot)p; +/* 40 */ id = hp.getInternalDrone(); +/* */ } +/* */ } +/* */ else { +/* 44 */ id = ArmyOfZombies.instance().get(this.droneID); +/* */ } +/* */ +/* 47 */ if (id != null) { +/* 48 */ short _dir = this.dir; +/* 49 */ _dir = (short)(90 - _dir); +/* 50 */ _dir = (short)(360 - _dir); +/* 51 */ id.longLoc(this.x, this.y, this.z, _dir); +/* */ +/* 53 */ doCallback(true); +/* 54 */ return true; +/* */ } +/* */ +/* 57 */ doCallback(true); +/* 58 */ return true; +/* */ } +/* */ +/* */ public void save(DataOutputStream dos) throws java.io.IOException +/* */ { +/* 63 */ super.save(dos); +/* 64 */ dos.writeUTF(this.droneID); +/* 65 */ dos.writeShort(this.x); +/* 66 */ dos.writeShort(this.y); +/* 67 */ dos.writeShort(this.z); +/* 68 */ dos.writeShort(this.dir); +/* */ } +/* */ +/* */ public void load(DataInputStream dis) throws java.io.IOException +/* */ { +/* 73 */ super.load(dis); +/* 74 */ this.droneID = dis.readUTF(); +/* 75 */ this.x = dis.readShort(); +/* 76 */ this.y = dis.readShort(); +/* 77 */ this.z = dis.readShort(); +/* 78 */ this.dir = dis.readShort(); +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\console\BBMoveDroneCommand.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |