diff options
| author | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2021-05-03 16:38:41 -0700 |
| commit | e1e781bb2135ef78592226f1a3eaba4925702f1f (patch) | |
| tree | 8a5b590463ed413e1c6eabb719130e701b95ca63 /NET/worlds/console/BBDroneDeltaPosCommand.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/console/BBDroneDeltaPosCommand.java')
| -rw-r--r-- | NET/worlds/console/BBDroneDeltaPosCommand.java | 84 |
1 files changed, 84 insertions, 0 deletions
diff --git a/NET/worlds/console/BBDroneDeltaPosCommand.java b/NET/worlds/console/BBDroneDeltaPosCommand.java new file mode 100644 index 0000000..07c2140 --- /dev/null +++ b/NET/worlds/console/BBDroneDeltaPosCommand.java @@ -0,0 +1,84 @@ +/* */ 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 + */
\ No newline at end of file |