2 REGISTER_NET_LINKED(ENT_CLIENT_CORNER)
5 bool corner_send(entity this, entity to, int sf)
7 WriteHeader(MSG_ENTITY, ENT_CLIENT_CORNER);
9 WriteString(MSG_ENTITY, this.platmovetype);
11 WriteVector(MSG_ENTITY, this.origin);
13 WriteString(MSG_ENTITY, this.target);
14 WriteString(MSG_ENTITY, this.target2);
15 WriteString(MSG_ENTITY, this.target3);
16 WriteString(MSG_ENTITY, this.target4);
17 WriteString(MSG_ENTITY, this.targetname);
18 WriteByte(MSG_ENTITY, this.target_random);
20 WriteByte(MSG_ENTITY, this.wait);
25 void corner_link(entity this)
27 //Net_LinkEntity(this, false, 0, corner_send);
30 spawnfunc(path_corner)
32 // setup values for overriding train movement
33 // if a second value does not exist, both start and end speeds are the single value specified
34 set_platmovetype(this, this.platmovetype);
40 void corner_remove(entity this)
42 if(this.target) { strunzone(this.target); }
43 this.target = string_null;
45 if(this.target2) { strunzone(this.target2); }
46 this.target2 = string_null;
48 if(this.target3) { strunzone(this.target3); }
49 this.target3 = string_null;
51 if(this.target4) { strunzone(this.target4); }
52 this.target4 = string_null;
54 if(this.targetname) { strunzone(this.targetname); }
55 this.targetname = string_null;
57 if(this.platmovetype) { strunzone(this.platmovetype); }
58 this.platmovetype = string_null;
61 NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
63 this.platmovetype = strzone(ReadString());
65 this.origin = ReadVector();
66 setorigin(this, this.origin);
68 this.target = strzone(ReadString());
69 this.target2 = strzone(ReadString());
70 this.target3 = strzone(ReadString());
71 this.target4 = strzone(ReadString());
72 this.targetname = strzone(ReadString());
73 this.target_random = ReadByte();
75 this.wait = ReadByte();
79 this.classname = "path_corner";
80 this.drawmask = MASK_NORMAL;
81 this.entremove = corner_remove;
83 set_platmovetype(this, this.platmovetype);