1 REGISTER_NET_LINKED(ENT_CLIENT_LADDER)
3 void func_ladder_touch(entity this, entity toucher)
6 if (!toucher.iscreature)
8 if(IS_VEHICLE(toucher))
11 if(!toucher.isplayermodel)
15 EXACTTRIGGER_TOUCH(this, toucher);
17 toucher.ladder_time = time + 0.1;
18 toucher.ladder_entity = this;
22 bool func_ladder_send(entity this, entity to, int sf)
24 WriteHeader(MSG_ENTITY, ENT_CLIENT_LADDER);
26 WriteString(MSG_ENTITY, this.classname);
27 WriteByte(MSG_ENTITY, this.skin);
28 WriteCoord(MSG_ENTITY, this.speed);
30 trigger_common_write(this, false);
35 void func_ladder_link(entity this)
37 trigger_link(this, func_ladder_send);
38 //this.model = "null";
41 void func_ladder_init(entity this)
43 settouch(this, func_ladder_touch);
46 func_ladder_link(this);
49 spawnfunc(func_ladder)
51 func_ladder_init(this);
56 func_ladder_init(this);
62 void func_ladder_remove(entity this)
64 if(this.classname) { strunzone(this.classname); }
65 this.classname = string_null;
68 NET_HANDLE(ENT_CLIENT_LADDER, bool isnew)
70 this.classname = strzone(ReadString());
71 this.skin = ReadByte();
72 this.speed = ReadCoord();
74 trigger_common_read(this, false);
76 this.solid = SOLID_TRIGGER;
77 settouch(this, func_ladder_touch);
78 this.drawmask = MASK_NORMAL;
79 this.move_time = time;
80 this.entremove = func_ladder_remove;