summaryrefslogtreecommitdiff
path: root/NET/worlds/network/shortLocCmd.java
blob: 5f1eee8e3a33a4b96212b0087b96455dfc355b85 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
/*    */ package NET.worlds.network;
/*    */ 
/*    */ import NET.worlds.scape.Drone;
/*    */ import java.io.IOException;
/*    */ import java.io.PrintStream;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class shortLocCmd
/*    */   extends receivedNetPacket
/*    */ {
/*    */   public static final byte SHORTLOCCMD = 4;
/*    */   protected byte _dx;
/*    */   protected byte _dy;
/*    */   protected byte _ddirection;
/*    */   
/*    */   public shortLocCmd()
/*    */   {
/* 47 */     this._commandType = 4;
/*    */   }
/*    */   
/*    */   void parseNetData(ServerInputStream data) throws IOException
/*    */   {
/* 52 */     this._dx = data.readByte();
/* 53 */     this._dy = data.readByte();
/* 54 */     this._ddirection = data.readByte();
/*    */   }
/*    */   
/*    */   void process(WorldServer _serv) throws Exception
/*    */   {
/* 59 */     NetworkObject o = _serv.getObject(this._objID);
/* 60 */     if (o == null)
/*    */     {
/* 62 */       System.out.println("Unknown short id: " + toString(_serv));
/* 63 */       new Exception().printStackTrace(System.out);
/* 64 */       return;
/*    */     }
/*    */     
/* 67 */     if ((o instanceof Drone)) {
/* 68 */       ((Drone)o).shortLoc(this._dx, this._dy, this._ddirection);
/*    */     }
/*    */   }
/*    */   
/*    */ 
/*    */   public String toString(WorldServer serv)
/*    */   {
/* 75 */     return 
/* 76 */       "SHORTLOC " + this._objID.toString(serv) + " delta=" + this._dx + "," + this._dy + "," + this._ddirection;
/*    */   }
/*    */   
/*    */   public String toString()
/*    */   {
/* 81 */     return 
/* 82 */       "SHORTLOC " + this._objID + " delta=" + this._dx + "," + this._dy + "," + this._ddirection;
/*    */   }
/*    */ }


/* Location:              C:\Program Files (x86)\Worlds Inc\WorldsPlayer - Win7\lib\worlds.jar!\NET\worlds\network\shortLocCmd.class
 * Java compiler version: 6 (50.0)
 * JD-Core Version:       0.7.1
 */