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);
14 sf = BITSET(sf, BIT(0), this.target_random);
16 sf = BITSET(sf, BIT(1), this.target && this.target != "");
17 sf = BITSET(sf, BIT(2), this.target2 && this.target2 != "");
18 sf = BITSET(sf, BIT(3), this.target3 && this.target3 != "");
19 sf = BITSET(sf, BIT(4), this.target4 && this.target4 != "");
20 sf = BITSET(sf, BIT(5), this.targetname && this.targetname != "");
22 WriteByte(MSG_ENTITY, sf);
24 WriteString(MSG_ENTITY, this.target);
26 WriteString(MSG_ENTITY, this.target2);
28 WriteString(MSG_ENTITY, this.target3);
30 WriteString(MSG_ENTITY, this.target4);
32 WriteString(MSG_ENTITY, this.targetname);
34 WriteByte(MSG_ENTITY, this.wait);
39 void corner_link(entity this)
41 //Net_LinkEntity(this, false, 0, corner_send);
44 spawnfunc(path_corner)
46 // setup values for overriding train movement
47 // if a second value does not exist, both start and end speeds are the single value specified
48 set_platmovetype(this, this.platmovetype);
54 void corner_remove(entity this)
57 strfree(this.target2);
58 strfree(this.target3);
59 strfree(this.target4);
60 strfree(this.targetname);
61 strfree(this.platmovetype);
64 NET_HANDLE(ENT_CLIENT_CORNER, bool isnew)
66 this.platmovetype = strzone(ReadString());
68 this.origin = ReadVector();
69 setorigin(this, this.origin);
71 int targbits = ReadByte();
72 this.target_random = (targbits & BIT(0));
74 this.target = ((targbits & BIT(1)) ? strzone(ReadString()) : string_null);
75 this.target2 = ((targbits & BIT(2)) ? strzone(ReadString()) : string_null);
76 this.target3 = ((targbits & BIT(3)) ? strzone(ReadString()) : string_null);
77 this.target4 = ((targbits & BIT(4)) ? strzone(ReadString()) : string_null);
78 this.targetname = ((targbits & BIT(5)) ? strzone(ReadString()) : string_null);
80 this.wait = ReadByte();
84 this.classname = "path_corner";
85 this.drawmask = MASK_NORMAL;
86 this.entremove = corner_remove;
88 set_platmovetype(this, this.platmovetype);