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 void CSQC_SPIDER_HUD()
245 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', 1, DRAWFLAG_NORMAL);
258 //picsize = drawgetimagesize(spider_a2) * 0.5;
259 //drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
261 //drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
262 //drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
263 //drawstring(hudloc + '136 102 0', strcat(ftos(ammo1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
265 pic2size = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
268 picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
269 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
270 //drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
274 picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
275 drawpic(hudloc + picloc, hud_ammo2_ico, pic2size, '1 1 1', 1, DRAWFLAG_NORMAL);
276 //drawstring(hudloc + '179 69 0', strcat(ftos(9 - ammo2), " / 8"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
284 pic2size = drawgetimagesize(spider_ico) * (autocvar_cl_vehicles_hudscale - 0.1);
285 picloc = picsize * 0.5 - pic2size * 0.5;
286 drawpic(hudloc + picloc, spider_ico, pic2size, '1 1 1' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
287 drawpic(hudloc + picloc, spider_rkt, pic2size, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
288 drawpic(hudloc + picloc, spider_mgun, pic2size, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
289 drawpic(hudloc + picloc, hud_sh, pic2size, '1 1 1', shield, DRAWFLAG_NORMAL);
293 picsize = drawgetimagesize(hud_hp_ico) * autocvar_cl_vehicles_hudscale;
294 picloc = '37 65 0' * autocvar_cl_vehicles_hudscale;
295 drawpic(hudloc + picloc, hud_hp_ico, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
297 picsize = drawgetimagesize(hud_hp_bar) * autocvar_cl_vehicles_hudscale;
298 picloc = '69 69 0' * autocvar_cl_vehicles_hudscale;
299 //drawsetcliparea(0, 0, hudloc_x + (picsize_x * shield), vid_conheight);
300 drawpic(hudloc + picloc, hud_hp_bar, picsize, '1 1 1', health, DRAWFLAG_NORMAL);
301 //drawresetcliparea();
304 picloc = '40 136 0' * autocvar_cl_vehicles_hudscale;
305 picsize = drawgetimagesize(hud_sh_ico) * autocvar_cl_vehicles_hudscale;
306 drawpic(hudloc + picloc, hud_sh_ico, picsize,'0.15 0.25 1' * shield + '0 0 0' * (1 - shield), 1, DRAWFLAG_NORMAL);
308 picsize = drawgetimagesize(hud_sh_bar) * autocvar_cl_vehicles_hudscale;
309 picloc = '69 140 0' * autocvar_cl_vehicles_hudscale;
310 //drawsetcliparea(0, 0, hudloc_x + (picsize_x * shield), vid_conheight);
311 drawpic(hudloc + picloc, hud_sh_bar, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
312 //drawresetcliparea();
315 // Minigun ammo icon & bar
316 picsize = drawgetimagesize(hud_ammo1_ico) * autocvar_cl_vehicles_hudscale;
317 picloc = '664 60 0' * autocvar_cl_vehicles_hudscale;
318 drawpic(hudloc + picloc, hud_ammo1_ico, picsize, '1 1 1' * ammo1 + '1 0 0' * (1 - ammo1), 1, DRAWFLAG_NORMAL);
320 picsize = drawgetimagesize(hud_ammo1_bar) * autocvar_cl_vehicles_hudscale;
321 picloc = '450 69 0' * autocvar_cl_vehicles_hudscale;
322 drawsetcliparea(picloc_x, picloc_y, hudloc_x + (picsize_x * ammo1), vid_conheight);
323 drawpic(hudloc + picloc, hud_ammo1_bar, picsize, '1 1 1', health, DRAWFLAG_NORMAL);
327 // Rocket ammo icon and bar
329 picloc = '664 130 0' * autocvar_cl_vehicles_hudscale;
330 picsize = drawgetimagesize(hud_ammo2_ico) * autocvar_cl_vehicles_hudscale;
331 drawpic(hudloc + picloc, hud_ammo2_ico, picsize, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
334 picsize = drawgetimagesize(hud_ammo2_bar) * autocvar_cl_vehicles_hudscale;
335 picloc = '450 140 0' * autocvar_cl_vehicles_hudscale;
336 //drawsetcliparea(0, 0, hudloc_x + (picsize_x * shield), vid_conheight);
337 drawpic(hudloc + picloc, hud_ammo2_bar, picsize, '1 1 1', health, DRAWFLAG_NORMAL);
338 //drawresetcliparea();
340 if (scoreboard_showscores)
342 HUD_DrawScoreboard();
343 HUD_DrawCenterPrint();
347 picsize = drawgetimagesize(SPIDER_CROSS);
348 picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
349 picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
351 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);
356 void CSQC_RAPTOR_HUD()
359 if(autocvar_r_letterbox)
362 vector picsize, hudloc;
366 // Fetch health & ammo stats
369 // Draw the crosshairs
370 picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga");
373 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);
378 picsize = drawgetimagesize(raptor_h) * 0.5;
379 drawpic(hudloc, raptor_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
381 picsize = drawgetimagesize(spider_a2) * 0.5;
382 drawpic(hudloc + '120 96 0', spider_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
384 drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
385 drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
386 drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'15 15 0','0.5 0.5 1', 1, DRAWFLAG_NORMAL);
392 picsize = drawgetimagesize(spider_a1) * 0.85;
395 drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
396 drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 1 0', 0.5, DRAWFLAG_NORMAL);
400 drawpic(hudloc + '132 54 0', spider_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
401 drawstring(hudloc + '179 69 0', strcat(ftos(reload2), "%"),'14 14 0','0 0 1', 1, DRAWFLAG_NORMAL);
404 picsize = drawgetimagesize(raptor_b) * 0.5;
407 reload1 = reload2 / 100;
408 drawpic(hudloc, raptor_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
409 drawpic(hudloc, raptor_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
410 drawpic(hudloc, raptor_g1, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
411 drawpic(hudloc, raptor_g2, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
416 dropmark.owner = self;
417 dropmark.gravity = 1;
422 where = dropmark.origin;
423 setorigin(dropmark, pmove_org);
424 dropmark.velocity = pmove_vel;
425 tracetoss(dropmark, self);
427 where = project_3d_to_2d(trace_endpos);
429 setorigin(dropmark, trace_endpos);
430 picsize = drawgetimagesize(raptor_d) * 0.2;
432 if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
434 where_x -= picsize_x * 0.5;
435 where_y -= picsize_y * 0.5;
437 drawpic(where, raptor_d, picsize, '0 2 0', 1, DRAWFLAG_ADDITIVE);
439 dropmark.cnt = time + 5;
443 if(dropmark.cnt > time)
445 where = project_3d_to_2d(dropmark.origin);
446 picsize = drawgetimagesize(raptor_d) * 0.25;
448 if not (where_z < 0 || where_x < 0 || where_y < 0 || where_x > vid_conwidth || where_y > vid_conheight)
450 where_x -= picsize_x * 0.5;
451 where_y -= picsize_y * 0.5;
453 drawpic(where, raptor_d, picsize, '2 0 0', 1, DRAWFLAG_ADDITIVE);
458 if (scoreboard_showscores)
460 HUD_DrawScoreboard();
461 HUD_DrawCenterPrint();
466 void CSQC_WAKIZASHI_HUD()
469 vector picsize, hudloc;
471 picsize = drawgetimagesize(SPIDER_CROSS);
472 picsize_x *= autocvar_cl_vehicle_spiderbot_cross_size;
473 picsize_y *= autocvar_cl_vehicle_spiderbot_cross_size;
474 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);
481 picsize = drawgetimagesize(waki_h) * 0.5;
482 drawpic(hudloc, waki_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
484 picsize = drawgetimagesize(waki_a2) * 0.7;
485 drawpic(hudloc + '116 92 0', waki_a2, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
488 drawstring(hudloc + '145 19 0', strcat(ftos(health), "%"),'15 15 0','0 1 0', 1, DRAWFLAG_NORMAL);
489 drawstring(hudloc + '175 34 0', strcat(ftos(shield), "%"),'15 15 0','0 0 1', 1, DRAWFLAG_NORMAL);
490 drawstring(hudloc + '136 102 0', strcat(ftos(energy), "%"),'14 14 0','1 1 1', 1, DRAWFLAG_NORMAL);
492 picsize = drawgetimagesize(waki_a1) * 0.75;
495 drawpic(hudloc + '140 55 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
496 drawpic(hudloc + '144 59 0', waki_a1, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
500 drawpic(hudloc + '140 55 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
501 drawpic(hudloc + '144 59 0', waki_a1, picsize, '-1 -1 -1', 1, DRAWFLAG_NORMAL);
502 drawstring(hudloc + '165 69 0', strcat(ftos(reload1), "%"),'14 14 0','1 1 0', 1, DRAWFLAG_NORMAL);
505 picsize = drawgetimagesize(waki_b) * 0.5;
514 drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
515 drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
516 drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
517 drawpic(hudloc, waki_e, picsize, '1 1 1' * energy + '1 0 0' * (1 - energy), 1, DRAWFLAG_NORMAL);
519 if (scoreboard_showscores)
521 HUD_DrawScoreboard();
522 HUD_DrawCenterPrint();
527 void Vehicles_Precache()
529 precache_model("models/vehicles/wakizashi.dpm");
531 precache_model("models/vehicles/bomblet.md3");
532 precache_model("models/vehicles/clusterbomb.md3");
533 precache_model("models/vehicles/clusterbomb_fragment.md3");
534 precache_model("models/vehicles/rocket01.md3");
535 precache_model("models/vehicles/rocket02.md3");
538 void RaptorCBShellfragDraw()
540 Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
544 self.move_avelocity += randomvec() * 15;
545 self.renderflags = 0;
547 self.alpha = bound(0, self.nextthink - time, 1);
549 if(self.alpha < ALPHA_MIN_VISIBLE)
554 void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
559 setmodel(sfrag, "models/vehicles/clusterbomb_fragment.md3");
560 setorigin(sfrag, _org);
562 sfrag.move_movetype = MOVETYPE_BOUNCE;
563 sfrag.gravity = 0.15;
564 sfrag.solid = SOLID_CORPSE;
566 sfrag.draw = RaptorCBShellfragDraw;
568 sfrag.move_origin = sfrag.origin = _org;
569 sfrag.move_velocity = _vel;
570 sfrag.move_avelocity = prandomvec() * vlen(sfrag.move_velocity);
571 sfrag.angles = self.move_angles = _ang;
573 sfrag.move_time = time;
574 sfrag.damageforcescale = 4;
576 sfrag.nextthink = time + 3;
577 sfrag.cnt = time + 2;
578 sfrag.drawmask = MASK_NORMAL;