1 void func_ladder_touch()
6 if (other.vehicle_flags & VHF_ISVEHICLE)
10 if(other.classname != "csqcmodel")
16 other.ladder_time = time + 0.1;
17 other.ladder_entity = self;
21 float func_ladder_send(entity to, float sf)
23 WriteByte(MSG_ENTITY, ENT_CLIENT_LADDER);
25 WriteString(MSG_ENTITY, self.classname);
26 WriteByte(MSG_ENTITY, self.warpzone_isboxy);
27 WriteByte(MSG_ENTITY, self.skin);
28 WriteByte(MSG_ENTITY, self.speed);
29 WriteByte(MSG_ENTITY, self.scale);
30 WriteCoord(MSG_ENTITY, self.origin_x);
31 WriteCoord(MSG_ENTITY, self.origin_y);
32 WriteCoord(MSG_ENTITY, self.origin_z);
34 WriteCoord(MSG_ENTITY, self.mins_x);
35 WriteCoord(MSG_ENTITY, self.mins_y);
36 WriteCoord(MSG_ENTITY, self.mins_z);
37 WriteCoord(MSG_ENTITY, self.maxs_x);
38 WriteCoord(MSG_ENTITY, self.maxs_y);
39 WriteCoord(MSG_ENTITY, self.maxs_z);
41 WriteCoord(MSG_ENTITY, self.movedir_x);
42 WriteCoord(MSG_ENTITY, self.movedir_y);
43 WriteCoord(MSG_ENTITY, self.movedir_z);
45 WriteCoord(MSG_ENTITY, self.angles_x);
46 WriteCoord(MSG_ENTITY, self.angles_y);
47 WriteCoord(MSG_ENTITY, self.angles_z);
52 void func_ladder_link()
54 Net_LinkEntity(self, FALSE, 0, func_ladder_send);
57 void spawnfunc_func_ladder()
60 self.touch = func_ladder_touch;
65 void spawnfunc_func_water()
68 self.touch = func_ladder_touch;
76 void func_ladder_draw()
78 float dt = time - self.move_time;
79 self.move_time = time;
80 if(dt <= 0) { return; }
82 trigger_touch_generic(func_ladder_touch);
85 void ent_func_ladder()
87 self.classname = strzone(ReadString());
88 self.warpzone_isboxy = ReadByte();
89 self.skin = ReadByte();
90 self.speed = ReadByte();
91 self.scale = ReadByte();
92 self.origin_x = ReadCoord();
93 self.origin_y = ReadCoord();
94 self.origin_z = ReadCoord();
95 setorigin(self, self.origin);
96 self.mins_x = ReadCoord();
97 self.mins_y = ReadCoord();
98 self.mins_z = ReadCoord();
99 self.maxs_x = ReadCoord();
100 self.maxs_y = ReadCoord();
101 self.maxs_z = ReadCoord();
102 setsize(self, self.mins, self.maxs);
103 self.movedir_x = ReadCoord();
104 self.movedir_y = ReadCoord();
105 self.movedir_z = ReadCoord();
106 self.angles_x = ReadCoord();
107 self.angles_y = ReadCoord();
108 self.angles_z = ReadCoord();
110 self.solid = SOLID_TRIGGER;
111 self.draw = func_ladder_draw;
112 self.drawmask = MASK_NORMAL;
113 self.move_time = time;