4 #include "../dpdefs/progsdefs.qh"
6 #include "vehicles/vehicles_def.qh"
8 #include "../warpzonelib/util_server.qh"
10 #include "miscfunctions.qh"
12 #define EXACTTRIGGER_TOUCH if(WarpZoneLib_ExactTrigger_Touch()) return
16 .entity ladder_entity;
26 void spawnfunc_weapon_crossbow() {}
27 void spawnfunc_weapon_handgrenade() {}
28 void spawnfunc_ammo_crossbow() {}
29 void spawnfunc_ammo_9mmclip() {}
30 void spawnfunc_ammo_gaussclip() {}
31 void spawnfunc_weapon_rpg() {}
32 void spawnfunc_weapon_357() {}
33 void ammo_ARgrenades() {}
34 void spawnfunc_item_battery() {}
35 void spawnfunc_ammo_rpgclip() {}
36 void weapon_9mmAR() {}
37 void spawnfunc_weapon_tripmine() {}
38 void spawnfunc_weapon_snark() {}
39 void spawnfunc_ammo_buckshot() {}
41 void spawnfunc_ammo_357() {}
42 void spawnfunc_weapon_gauss() {}
43 void spawnfunc_weapon_hornetgun() {}
44 //void spawnfunc_weapon_shotgun() {}
45 void spawnfunc_item_healthkit() {}
46 void spawnfunc_item_longjump() {}
47 void spawnfunc_item_antidote() {}
48 void spawnfunc_func_recharge() {}
49 void spawnfunc_info_node() {}
50 void spawnfunc_env_sound() {}
51 void spawnfunc_light_spot() {}
52 void spawnfunc_func_healthcharger() {}
55 void func_ladder_touch()
58 if (!other.iscreature)
60 if (other.vehicle_flags & VHF_ISVEHICLE)
64 if(other.classname != "csqcmodel")
70 other.ladder_time = time + 0.1;
71 other.ladder_entity = self;
75 float func_ladder_send(entity to, float sf)
77 WriteByte(MSG_ENTITY, ENT_CLIENT_LADDER);
79 WriteString(MSG_ENTITY, self.classname);
80 WriteByte(MSG_ENTITY, self.warpzone_isboxy);
81 WriteByte(MSG_ENTITY, self.skin);
82 WriteByte(MSG_ENTITY, self.speed);
83 WriteByte(MSG_ENTITY, self.scale);
84 WriteCoord(MSG_ENTITY, self.origin_x);
85 WriteCoord(MSG_ENTITY, self.origin_y);
86 WriteCoord(MSG_ENTITY, self.origin_z);
88 WriteCoord(MSG_ENTITY, self.mins_x);
89 WriteCoord(MSG_ENTITY, self.mins_y);
90 WriteCoord(MSG_ENTITY, self.mins_z);
91 WriteCoord(MSG_ENTITY, self.maxs_x);
92 WriteCoord(MSG_ENTITY, self.maxs_y);
93 WriteCoord(MSG_ENTITY, self.maxs_z);
95 WriteCoord(MSG_ENTITY, self.movedir_x);
96 WriteCoord(MSG_ENTITY, self.movedir_y);
97 WriteCoord(MSG_ENTITY, self.movedir_z);
99 WriteCoord(MSG_ENTITY, self.angles_x);
100 WriteCoord(MSG_ENTITY, self.angles_y);
101 WriteCoord(MSG_ENTITY, self.angles_z);
106 void func_ladder_link()
108 Net_LinkEntity(self, false, 0, func_ladder_send);
111 void spawnfunc_func_ladder()
114 self.touch = func_ladder_touch;
119 void spawnfunc_func_water()
122 self.touch = func_ladder_touch;
130 void func_ladder_draw()
132 float dt = time - self.move_time;
133 self.move_time = time;
134 if(dt <= 0) { return; }
136 trigger_touch_generic(func_ladder_touch);
139 void ent_func_ladder()
141 self.classname = strzone(ReadString());
142 self.warpzone_isboxy = ReadByte();
143 self.skin = ReadByte();
144 self.speed = ReadByte();
145 self.scale = ReadByte();
146 self.origin_x = ReadCoord();
147 self.origin_y = ReadCoord();
148 self.origin_z = ReadCoord();
149 setorigin(self, self.origin);
150 self.mins_x = ReadCoord();
151 self.mins_y = ReadCoord();
152 self.mins_z = ReadCoord();
153 self.maxs_x = ReadCoord();
154 self.maxs_y = ReadCoord();
155 self.maxs_z = ReadCoord();
156 setsize(self, self.mins, self.maxs);
157 self.movedir_x = ReadCoord();
158 self.movedir_y = ReadCoord();
159 self.movedir_z = ReadCoord();
160 self.angles_x = ReadCoord();
161 self.angles_y = ReadCoord();
162 self.angles_z = ReadCoord();
164 self.solid = SOLID_TRIGGER;
165 self.draw = func_ladder_draw;
166 self.drawmask = MASK_NORMAL;
167 self.move_time = time;