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/network/longLocCmd.java | |
| download | worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.tar.xz worlds.jar-e1e781bb2135ef78592226f1a3eaba4925702f1f.zip | |
Diffstat (limited to 'NET/worlds/network/longLocCmd.java')
| -rw-r--r-- | NET/worlds/network/longLocCmd.java | 116 |
1 files changed, 116 insertions, 0 deletions
diff --git a/NET/worlds/network/longLocCmd.java b/NET/worlds/network/longLocCmd.java new file mode 100644 index 0000000..01df714 --- /dev/null +++ b/NET/worlds/network/longLocCmd.java @@ -0,0 +1,116 @@ +/* */ package NET.worlds.network; +/* */ +/* */ import NET.worlds.scape.Drone; +/* */ import java.io.IOException; +/* */ import java.io.PrintStream; +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ +/* */ public class longLocCmd +/* */ extends receivedNetPacket +/* */ { +/* */ public static final byte LONGLOCCMD = 1; +/* */ protected short _x; +/* */ protected short _y; +/* */ protected short _z; +/* */ protected short _dir; +/* */ +/* */ public longLocCmd() +/* */ { +/* 50 */ this._commandType = 1; +/* */ } +/* */ +/* */ public longLocCmd(short x, short y, short z, short dir) { +/* 54 */ super(null, 1); +/* */ +/* 56 */ this._x = x; +/* 57 */ this._y = y; +/* 58 */ this._z = z; +/* 59 */ this._dir = dir; +/* */ } +/* */ +/* */ void parseNetData(ServerInputStream data) throws IOException +/* */ { +/* 64 */ this._x = data.readShort(); +/* 65 */ this._y = data.readShort(); +/* 66 */ this._z = data.readShort(); +/* 67 */ this._dir = data.readShort(); +/* */ } +/* */ +/* */ int packetSize() +/* */ { +/* 72 */ return 8 + super.packetSize(); +/* */ } +/* */ +/* */ void send(ServerOutputStream o) throws IOException +/* */ { +/* 77 */ super.send(o); +/* 78 */ o.writeShort(this._x); +/* 79 */ o.writeShort(this._y); +/* 80 */ o.writeShort(this._z); +/* 81 */ o.writeShort(this._dir); +/* */ } +/* */ +/* */ void process(WorldServer _serv) throws Exception +/* */ { +/* 86 */ NetworkObject o = _serv.getObject(this._objID); +/* 87 */ if ((o instanceof Drone)) { +/* 88 */ this._dir = ((short)(90 - this._dir)); +/* 89 */ this._dir = ((short)(360 - this._dir)); +/* */ +/* */ +/* */ +/* */ +/* */ +/* 95 */ ((Drone)o).longLoc(this._x, this._y, this._z, this._dir); +/* */ } +/* */ +/* 98 */ if (o == null) { +/* 99 */ System.out.println("error in message: " + toString(_serv)); +/* */ } +/* */ } +/* */ +/* */ +/* */ +/* */ public String toString(WorldServer serv) +/* */ { +/* 107 */ return +/* 108 */ "LONGLOC " + this._objID.toString(serv) + " @ " + this._x + "," + this._y + "," + this._z + "," + this._dir; +/* */ } +/* */ } + + +/* Location: C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\longLocCmd.class + * Java compiler version: 6 (50.0) + * JD-Core Version: 0.7.1 + */
\ No newline at end of file |