1 #define spider_rocket_icon "gfx/vehicles/rocket_ico.tga"
2 #define spider_rocket_targ "gfx/vehicles/target.tga"
3 //#define SPIDER_CROSS "textures/spiderbot/cross.tga"
4 #define SPIDER_CROSS "gfx/vehicles/axh-special1.tga"
7 #define axh1 "gfx/vehicles/sbot-xhair2.tga"
8 #define axh2 "gfx/vehicles/sbot-xhair2.tga"
9 #define axh3 "gfx/vehicles/sbot-xhair2.tga"
12 #define hud_bg "gfx/vehicles/frame.tga"
13 #define hud_sh "gfx/vehicles/vh-shield.tga"
15 #define hud_hp_bar "gfx/vehicles/bar_up_left.tga"
16 #define hud_hp_ico "gfx/vehicles/health.tga"
17 #define hud_sh_bar "gfx/vehicles/bar_dwn_left.tga"
18 #define hud_sh_ico "gfx/vehicles/shield.tga"
20 #define hud_ammo1_bar "gfx/vehicles/bar_up_right.tga"
21 #define hud_ammo1_ico "gfx/vehicles/bullets.tga"
22 #define hud_ammo2_bar "gfx/vehicles/bar_dwn_right.tga"
23 #define hud_ammo2_ico "gfx/vehicles/rocket.tga"
25 #define spider_ico "gfx/vehicles/sbot.tga"
26 #define spider_rkt "gfx/vehicles/sbot_rpods.tga"
27 #define spider_mgun "gfx/vehicles/sbot_mguns.tga"
29 #define raptor_ico "gfx/vehicles/raptor.tga"
30 #define raptor_gun "gfx/vehicles/raptor_guns.tga"
31 #define raptor_bomb "gfx/vehicles/raptor_bombs.tga"
32 #define raptor_drop "gfx/vehicles/axh-dropcross.tga"
34 #define waki_ico "gfx/vehicles/waki.tga"
35 #define waki_eng "gfx/vehicles/waki_e.tga"
36 #define waki_gun "gfx/vehicles/waki_guns.tga"
37 #define waki_rkt "gfx/vehicles/waki_rockets.tga"
41 void CSQC_WAKIZASHI_HUD();
42 void CSQC_SPIDER_HUD();
43 void CSQC_RAPTOR_HUD();
44 void CSQC_BUMBLE_HUD();
47 entity AuxiliaryXhair[MAX_AXH];
48 const var void Draw_Not();
55 void AuxiliaryXhair_Draw2D()
59 psize = self.axh_scale * drawgetimagesize(self.axh_image);
60 loc = project_3d_to_2d(self.origin) - 0.5 * psize;
61 if not (loc_z < 0 || loc_x < 0 || loc_y < 0 || loc_x > vid_conwidth || loc_y > vid_conheight)
65 drawpic(loc, self.axh_image, psize, self.colormod, self.alpha, self.axh_drawflag);
68 if(time - self.cnt > self.axh_fadetime)
69 self.draw2d = Draw_Not;
72 void Net_AuXair2(float bIsNew)
77 axh_id = bound(0, ReadByte(), MAX_AXH);
78 axh = AuxiliaryXhair[axh_id];
80 if(axh == world || wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
83 axh.draw2d = Draw_Not;
84 axh.drawmask = MASK_NORMAL;
85 axh.axh_drawflag = DRAWFLAG_ADDITIVE;
86 axh.axh_fadetime = 0.1;
87 axh.axh_image = "gfx/vehicles/axh-ring.tga";
90 AuxiliaryXhair[axh_id] = axh;
93 axh.draw2d = AuxiliaryXhair_Draw2D;
95 axh.origin_x = ReadCoord();
96 axh.origin_y = ReadCoord();
97 axh.origin_z = ReadCoord();
99 axh.colormod_x = ReadByte() / 255;
100 axh.colormod_y = ReadByte() / 255;
101 axh.colormod_z = ReadByte() / 255;
105 void Net_VehicleSetup()
109 hud_id = bound(HUD_SPIDERBOT, ReadByte(), HUD_RAPTOR);
111 // Init auxiliary crosshairs
113 for(i = 0; i < MAX_AXH; ++i)
115 axh = AuxiliaryXhair[i];
116 if(axh != world && !wasfreed(axh)) // MADNESS? THIS IS QQQQCCCCCCCCC (wasfreed, why do you exsist?)
120 axh.draw2d = Draw_Not;
121 axh.drawmask = MASK_NORMAL;
122 axh.axh_drawflag = DRAWFLAG_ADDITIVE;
123 axh.axh_fadetime = 0.1;
124 axh.axh_image = "gfx/vehicles/axh-ring.tga";
127 AuxiliaryXhair[i] = axh;
134 AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-ring.tga";
135 AuxiliaryXhair[0].axh_scale = 0.25;
137 AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-ring.tga";
138 AuxiliaryXhair[1].axh_scale = 0.25;
140 AuxiliaryXhair[2].axh_image = "gfx/vehicles/axh-special1.tga";
141 AuxiliaryXhair[2].axh_scale = 0.5;
145 AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga";
146 AuxiliaryXhair[0].axh_scale = 0.25;
150 AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-cross.tga";
151 AuxiliaryXhair[0].axh_scale = 0.5;
152 AuxiliaryXhair[0].alpha = 0.25;
154 AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-bracket.tga";
155 AuxiliaryXhair[1].axh_scale = 0.25;
156 AuxiliaryXhair[1].alpha = 0.75;
157 AuxiliaryXhair[1].axh_drawflag = DRAWFLAG_NORMAL;
162 AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-ring.tga";
163 AuxiliaryXhair[0].axh_scale = 0.25;
165 AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-special1.tga";
166 AuxiliaryXhair[1].axh_scale = 0.25;
170 #define HUD_GETSTATS \
171 float health = getstati(STAT_VEHICLESTAT_HEALTH); \
172 float shield = getstati(STAT_VEHICLESTAT_SHIELD); \
173 float energy = getstati(STAT_VEHICLESTAT_ENERGY); \
174 float ammo1 = getstati(STAT_VEHICLESTAT_AMMO1); \
175 float reload1 = getstati(STAT_VEHICLESTAT_RELOAD1); \
176 float ammo2 = getstati(STAT_VEHICLESTAT_AMMO2); \
177 float reload2 = getstati(STAT_VEHICLESTAT_RELOAD2);
179 void CSQC_BUMBLE_HUD()
182 vector picsize, hudloc;
184 // Fetch health & ammo stats
190 picsize = drawgetimagesize(spider_h) * 0.5;
191 drawpic(hudloc, spider_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
193 picsize = drawgetimagesize(spider_a2) * 0.5;
194 drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
196 drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
197 drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
198 drawstring(hudloc + '136 102 0', strcat(ftos(ammo1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
200 picsize = drawgetimagesize(spider_a1) * 0.85;
203 drawpic(hudloc + '132 54 0', spider_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
204 drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
208 drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
209 drawstring(hudloc + '179 69 0', strcat(ftos(9 - ammo2), " / 8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
212 picsize = drawgetimagesize(spider_b) * 0.5;
221 drawpic(hudloc, spider_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
222 drawpic(hudloc, spider_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
223 drawpic(hudloc, spider_r, picsize, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
224 drawpic(hudloc, spider_g, picsize, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
227 if (scoreboard_showscores)
229 HUD_DrawScoreboard();
230 HUD_DrawCenterPrint();
234 picsize = drawgetimagesize(SPIDER_CROSS);
235 picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
236 picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
238 drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_ADDITIVE);
242 float autocvar_cl_vehicles_hudscale;
243 float autocvar_cl_vehicles_hudalpha;
245 void CSQC_SPIDER_HUD()
247 vector picsize, hudloc, pic2size, picloc;
249 // Fetch health & ammo stats
252 picsize = drawgetimagesize(hud_bg) * autocvar_cl_vehicles_hudscale;
253 hudloc_y = vid_conheight - picsize_y;
254 hudloc_x = vid_conwidth * 0.5 - picsize_x * 0.5;
256 drawpic(hudloc, hud_bg, picsize, '1 1 1', autocvar_cl_vehicles_hudalpha, DRAWFLAG_NORMAL);
258 //drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
259 //drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
260 //drawstring(hudloc + '136 102 0', strcat(ftos(ammo1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
261 //drawstring(hudloc + '179 69 0', strcat(ftos(9 - ammo2), " / 8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
268 pic2size = drawgetimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale * 0.8);
269 picloc = picsize * 0.5 - pic2size * 0.5;
270 drawpic(hudloc + picloc, spider_ico, pic2size, '1 1 1' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
271 drawpic(hudloc + picloc, spider_rkt, pic2size, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
272 drawpic(hudloc + picloc, spider_mgun, pic2size, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
273 drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL);
276 picsize = drawgetimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
277 picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
278 drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - health)), 0, vid_conwidth, vid_conheight);
279 drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', 1 , DRAWFLAG_NORMAL);
282 picsize = drawgetimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
283 picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
285 drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
287 drawpic(hudloc + picloc, hud_hp_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
290 picsize = drawgetimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
291 picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
292 drawsetcliparea(hudloc_x + picloc_x + (picsize_x * (1 - shield)), 0, vid_conwidth, vid_conheight);
293 drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
296 picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
297 picsize = drawgetimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
299 drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
301 drawpic(hudloc + picloc, hud_sh_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
304 picsize = drawgetimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
305 picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
306 drawsetcliparea(hudloc_x + picloc_x, picloc_y, picsize_x * ammo1, vid_conheight);
307 drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
310 picsize = drawgetimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
311 picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
313 drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
315 drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
319 picsize = drawgetimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
320 ammo1 = picsize_x / 8;
321 picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
322 drawsetcliparea(hudloc_x + picloc_x, hudloc_y + picloc_y, picsize_x * reload2, vid_conheight);
323 drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
327 pic2size = 0.35 * drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
328 picloc_x -= pic2size_x;
329 picloc_y += pic2size_y * 2.25;
332 for(i = 1; i < 9; ++i)
335 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, ((8 * reload2 <= i) ? '0 0 0' : '1 1 1'), 0.75, DRAWFLAG_NORMAL);
340 for(i = 1; i < 9; ++i)
343 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, ((i >= ammo2) ? '1 1 1' : '0 0 0'), 0.75, DRAWFLAG_NORMAL);
346 pic2size = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
347 picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
349 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 0 0' + '0 1 1' * sin(time * 8), 1, DRAWFLAG_NORMAL);
351 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL);
354 HUD_DrawCenterPrint();
356 if (scoreboard_showscores)
357 HUD_DrawScoreboard();
360 picsize = drawgetimagesize(SPIDER_CROSS);
361 picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
362 picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
364 drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_ADDITIVE);
369 void CSQC_RAPTOR_HUD()
372 if(autocvar_r_letterbox)
375 vector picsize, hudloc;
379 // Fetch health & ammo stats
382 // Draw the crosshairs
383 picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga");
386 drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), "gfx/vehicles/axh-cross.tga", picsize, '1 0 0' + '0 1 1' * energy, 0.5, DRAWFLAG_ADDITIVE);
391 picsize = drawgetimagesize(raptor_h) * 0.5;
392 drawpic(hudloc, raptor_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
394 picsize = drawgetimagesize(spider_a2) * 0.5;
395 drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
397 drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
398 drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
399 drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'15 15 0','0.5 0.5 1', 1, DRAWFLAG_NORMAL);
405 picsize = drawgetimagesize(spider_a1) * 0.85;
408 drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
409 drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 1 0', 0.5, DRAWFLAG_NORMAL);
413 drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
414 drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 0 1', 1, DRAWFLAG_NORMAL);
417 picsize = drawgetimagesize(raptor_b) * 0.5;
420 reload1 = reload2 / 100;
421 drawpic(hudloc, raptor_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
422 drawpic(hudloc, raptor_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
423 drawpic(hudloc, raptor_g1, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
424 drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
429 dropmark.owner = self;
430 dropmark.gravity = 1;
435 where = dropmark.origin;
436 setorigin(dropmark, pmove_org);
437 dropmark.velocity = pmove_vel;
438 tracetoss(dropmark, self);
440 where = project_3d_to_2d(trace_endpos);
442 setorigin(dropmark, trace_endpos);
443 picsize = drawgetimagesize(raptor_d) * 0.2;
445 if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
447 where_x -= picsize_x * 0.5;
448 where_y -= picsize_y * 0.5;
450 drawpic(where, raptor_d, picsize, '0 2 0', 1, DRAWFLAG_ADDITIVE);
452 dropmark.cnt = time + 5;
456 if(dropmark.cnt > time)
458 where = project_3d_to_2d(dropmark.origin);
459 picsize = drawgetimagesize(raptor_d) * 0.25;
461 if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
463 where_x -= picsize_x * 0.5;
464 where_y -= picsize_y * 0.5;
466 drawpic(where, raptor_d, picsize, '2 0 0', 1, DRAWFLAG_ADDITIVE);
471 if (scoreboard_showscores)
473 HUD_DrawScoreboard();
474 HUD_DrawCenterPrint();
479 void CSQC_WAKIZASHI_HUD()
482 vector picsize, hudloc;
484 picsize = drawgetimagesize(SPIDER_CROSS);
485 picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
486 picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
487 drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), SPIDER_CROSS, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_NORMAL);
494 picsize = drawgetimagesize(waki_h) * 0.5;
495 drawpic(hudloc, waki_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
497 picsize = drawgetimagesize(waki_a2) * 0.7;
498 drawpic(hudloc + '116 92 0', waki_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
501 drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
502 drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
503 drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'14 14 0','1 1 1', 1, DRAWFLAG_NORMAL);
505 picsize = drawgetimagesize(waki_a1) * 0.75;
508 drawpic(hudloc + '140 55 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
509 drawpic(hudloc + '144 59 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
513 drawpic(hudloc + '140 55 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
514 drawpic(hudloc + '144 59 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
515 drawstring(hudloc + '165 69 0', strcat(ftos(reload1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
518 picsize = drawgetimagesize(waki_b) * 0.5;
527 drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
528 drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
529 drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
530 drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
532 if (scoreboard_showscores)
534 HUD_DrawScoreboard();
535 HUD_DrawCenterPrint();
540 void Vehicles_Precache()
542 precache_model("models/vehicles/wakizashi.dpm");
544 precache_model("models/vehicles/bomblet.md3");
545 precache_model("models/vehicles/clusterbomb.md3");
546 precache_model("models/vehicles/clusterbomb_fragment.md3");
547 precache_model("models/vehicles/rocket01.md3");
548 precache_model("models/vehicles/rocket02.md3");
551 void RaptorCBShellfragDraw()
553 Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
557 self.move_avelocity += randomvec() * 15;
558 self.renderflags = 0;
560 self.alpha = bound(0, self.nextthink - time, 1);
562 if(self.alpha < ALPHA_MIN_VISIBLE)
567 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
572 setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3");
573 setorigin(sfrag, _org);
575 sfrag.move_movetype = MOVETYPE_BOUNCE;
576 sfrag.gravity = 0.15;
577 sfrag.solid = SOLID_CORPSE;
579 sfrag.draw = RaptorCBShellfragDraw;
581 sfrag.move_origin = sfrag.origin = _org;
582 sfrag.move_velocity = _vel;
583 sfrag.move_avelocity = prandomvec() * vlen(sfrag.move_velocity);
584 sfrag.angles = self.move_angles = _ang;
586 sfrag.move_time = time;
587 sfrag.damageforcescale = 4;
589 sfrag.nextthink = time + 3;
590 sfrag.cnt = time + 2;
591 sfrag.drawmask = MASK_NORMAL;