1 REGISTER_NET_LINKED(ENT_CLIENT_CORNER)
4 bool corner_send(entity this, entity to, int sf)
6 WriteHeader(MSG_ENTITY, ENT_CLIENT_CORNER);
8 WriteString(MSG_ENTITY, this.platmovetype);
10 WriteCoord(MSG_ENTITY, this.origin_x);
11 WriteCoord(MSG_ENTITY, this.origin_y);
12 WriteCoord(MSG_ENTITY, this.origin_z);
14 WriteString(MSG_ENTITY, this.target);
15 WriteString(MSG_ENTITY, this.target2);
16 WriteString(MSG_ENTITY, this.target3);
17 WriteString(MSG_ENTITY, this.target4);
18 WriteString(MSG_ENTITY, this.targetname);
19 WriteByte(MSG_ENTITY, this.target_random);
21 WriteByte(MSG_ENTITY, this.wait);
26 void corner_link(entity this)
28 //Net_LinkEntity(this, false, 0, corner_send);
31 spawnfunc(path_corner)
33 // setup values for overriding train movement
34 // if a second value does not exist, both start and end speeds are the single value specified
35 set_platmovetype(this, this.platmovetype);
41 void corner_remove(entity this)
43 if(this.target) { strunzone(this.target); }
44 this.target = string_null;
46 if(this.target2) { strunzone(this.target2); }
47 this.target2 = string_null;
49 if(this.target3) { strunzone(this.target3); }
50 this.target3 = string_null;
52 if(this.target4) { strunzone(this.target4); }
53 this.target4 = string_null;
55 if(this.targetname) { strunzone(this.targetname); }
56 this.targetname = string_null;
58 if(this.platmovetype) { strunzone(this.platmovetype); }
59 this.platmovetype = string_null;
62 NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
64 this.platmovetype = strzone(ReadString());
66 this.origin_x = ReadCoord();
67 this.origin_y = ReadCoord();
68 this.origin_z = ReadCoord();
69 setorigin(this, this.origin);
71 this.target = strzone(ReadString());
72 this.target2 = strzone(ReadString());
73 this.target3 = strzone(ReadString());
74 this.target4 = strzone(ReadString());
75 this.targetname = strzone(ReadString());
76 this.target_random = ReadByte();
78 this.wait = ReadByte();
82 this.classname = "path_corner";
83 this.drawmask = MASK_NORMAL;
84 this.entremove = corner_remove;
86 set_platmovetype(this, this.platmovetype);