1 #define RAPTOR_MIN '-80 -80 0'
2 #define RAPTOR_MAX '80 80 70'
4 float autocvar_g_vehicle_raptor_respawntime;
6 float autocvar_g_vehicle_raptor_movestyle;
7 float autocvar_g_vehicle_raptor_turnspeed;
8 float autocvar_g_vehicle_raptor_pitchspeed;
9 float autocvar_g_vehicle_raptor_pitchlimit;
11 float autocvar_g_vehicle_raptor_speed_forward;
12 float autocvar_g_vehicle_raptor_speed_strafe;
13 float autocvar_g_vehicle_raptor_speed_up;
14 float autocvar_g_vehicle_raptor_speed_down;
15 float autocvar_g_vehicle_raptor_friction;
17 float autocvar_g_vehicle_raptor_bomblets;
18 float autocvar_g_vehicle_raptor_bomblet_alt;
19 float autocvar_g_vehicle_raptor_bomblet_time;
20 float autocvar_g_vehicle_raptor_bomblet_damage;
21 float autocvar_g_vehicle_raptor_bomblet_spread;
22 float autocvar_g_vehicle_raptor_bomblet_edgedamage;
23 float autocvar_g_vehicle_raptor_bomblet_radius;
24 float autocvar_g_vehicle_raptor_bomblet_force;
25 float autocvar_g_vehicle_raptor_bomblet_explode_delay;
26 float autocvar_g_vehicle_raptor_bombs_refire;
28 float autocvar_g_vehicle_raptor_cannon_turnspeed;
29 float autocvar_g_vehicle_raptor_cannon_turnlimit;
30 float autocvar_g_vehicle_raptor_cannon_pitchlimit_up;
31 float autocvar_g_vehicle_raptor_cannon_pitchlimit_down;
33 float autocvar_g_vehicle_raptor_cannon_locktarget;
34 float autocvar_g_vehicle_raptor_cannon_locking_time;
35 float autocvar_g_vehicle_raptor_cannon_locking_releasetime;
36 float autocvar_g_vehicle_raptor_cannon_locked_time;
37 float autocvar_g_vehicle_raptor_cannon_predicttarget;
39 float autocvar_g_vehicle_raptor_cannon_cost;
40 float autocvar_g_vehicle_raptor_cannon_damage;
41 float autocvar_g_vehicle_raptor_cannon_radius;
42 float autocvar_g_vehicle_raptor_cannon_refire;
43 float autocvar_g_vehicle_raptor_cannon_speed;
44 float autocvar_g_vehicle_raptor_cannon_spread;
45 float autocvar_g_vehicle_raptor_cannon_force;
47 float autocvar_g_vehicle_raptor_energy;
48 float autocvar_g_vehicle_raptor_energy_regen;
49 float autocvar_g_vehicle_raptor_energy_regen_pause;
51 float autocvar_g_vehicle_raptor_health;
52 float autocvar_g_vehicle_raptor_health_regen;
53 float autocvar_g_vehicle_raptor_health_regen_pause;
55 float autocvar_g_vehicle_raptor_shield;
56 float autocvar_g_vehicle_raptor_shield_regen;
57 float autocvar_g_vehicle_raptor_shield_regen_pause;
61 float raptor_takeoff();
66 //#define RAPTOR_RETARDCAMERA
68 float raptor_altitude(float amax)
70 tracebox(self.origin, self.mins, self.maxs, self.origin - ('0 0 1' * amax), TRUE, self);
71 return vlen(self.origin - trace_endpos);
75 void raptor_bomblet_boom()
77 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
78 pointparticles(particleeffectnum("raptor_bomb_impact"), self.origin, trace_plane_normal * 1000, 1);
79 RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_bomblet_damage,
80 autocvar_g_vehicle_raptor_bomblet_edgedamage,
81 autocvar_g_vehicle_raptor_bomblet_radius, world,
82 autocvar_g_vehicle_raptor_bomblet_force, DEATH_SBROCKET, world);
86 void raptor_bomblet_touch()
88 if(other == self.owner)
92 self.think = raptor_bomblet_boom;
93 self.nextthink = time + random() * autocvar_g_vehicle_raptor_bomblet_explode_delay;
96 void raptor_bomb_burst()
99 if(autocvar_g_vehicle_raptor_bomblet_alt)
101 UpdateCSQCProjectile(self);
102 self.nextthink = time;
103 traceline(self.origin, self.origin + (normalize(self.velocity) * autocvar_g_vehicle_raptor_bomblet_alt), MOVE_NORMAL, self);
104 if(trace_fraction == 1.0)
107 if(vlen(self.origin - self.owner.origin) < autocvar_g_vehicle_raptor_bomblet_radius)
114 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
115 pointparticles(particleeffectnum("rocket_explode"), self.origin, self.velocity, 1);
117 for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
120 setorigin(bomblet, self.origin);
122 //bomblet.solid = SOLID_TRIGGER;
123 bomblet.movetype = MOVETYPE_TOSS;
124 bomblet.touch = raptor_bomblet_touch;
125 bomblet.think = raptor_bomblet_boom;
126 bomblet.nextthink = time + 5;
127 bomblet.owner = self.owner;
128 bomblet.realowner = self.realowner;
129 bomblet.velocity = normalize(normalize(self.velocity) + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * vlen(self.velocity);
130 PROJECTILE_MAKETRIGGER(bomblet);
131 CSQCProjectile(bomblet, TRUE, PROJECTILE_RAPTORBOMBLET, TRUE);
137 void raptor_bomb_touch()
142 void raptor_bombdrop()
144 entity bomb_1, bomb_2;
146 //self.bomb1.alpha = 0;
147 //self.bomb2.alpha = 0;
152 setorigin(bomb_1, gettaginfo(self, gettagindex(self, "bombmount_left")));
153 setorigin(bomb_2, gettaginfo(self, gettagindex(self, "bombmount_right")));
155 bomb_1.movetype = bomb_2.movetype = MOVETYPE_BOUNCE;
156 bomb_1.velocity = bomb_2.velocity = self.velocity;
157 bomb_1.touch = bomb_2.touch = raptor_bomb_touch;
158 bomb_1.think = bomb_2.think = raptor_bomb_burst;
159 bomb_1.cnt = bomb_2.cnt = time + 10;
161 if(autocvar_g_vehicle_raptor_bomblet_alt)
162 bomb_1.nextthink = bomb_2.nextthink = time;
164 bomb_1.nextthink = bomb_2.nextthink = time + autocvar_g_vehicle_raptor_bomblet_time;
166 bomb_1.owner = bomb_2.owner = self;
167 bomb_1.realowner = bomb_2.realowner = self.owner;
168 bomb_1.solid = bomb_2.solid = SOLID_BBOX;
169 bomb_1.gravity = bomb_2.gravity = 1;
171 PROJECTILE_MAKETRIGGER(bomb_1);
172 PROJECTILE_MAKETRIGGER(bomb_2);
174 CSQCProjectile(bomb_1, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
175 CSQCProjectile(bomb_2, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
180 void raptor_fire_cannon(entity gun, string tagname)
184 b_org = gettaginfo(gun, gettagindex(gun, tagname));
185 bolt = vehicles_projectile("raptor_cannon_impact", "weapons/laserimpact.wav", "raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
186 b_org, normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
187 autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force, 0,
188 DEATH_WAKIGUN, PROJECTILE_RAPTORCANNON, 0);
197 self.owner.PlayerPhysplug = raptor_takeoff;
198 self.movetype = MOVETYPE_FLY;
199 self.solid = SOLID_BBOX;
200 self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_raptor_health);
201 self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_raptor_shield);
203 self.velocity_z = 1; // Nudge upwards to takeoff sequense can work.
205 #ifdef RAPTOR_RETARDCAMERA
206 setorigin(self.vehicle_viewport, self.origin);
214 hgt = raptor_altitude(512);
215 self.velocity = (self.velocity * 0.9) + ('0 0 -1800' * (hgt / 256) * sys_frametime);
216 self.angles_x *= 0.95;
217 self.angles_z *= 0.95;
221 self.frame = max(self.frame - 0.25, 0);
223 self.bomb1.gun1.avelocity_y = 90 + ((self.frame / 25) * 2000);
224 self.bomb1.gun2.avelocity_y = -self.bomb1.gun1.avelocity_y;
228 self.movetype = MOVETYPE_TOSS;
229 self.think = raptor_think;
232 self.nextthink = time;
235 void raptor_exit(float eject)
238 if(self.deadflag == DEAD_NO)
240 self.think = raptor_land;
241 self.nextthink = time;
247 makevectors(self.angles);
250 setorigin(self.owner,self.origin + v_forward * 100 + '0 0 64');
251 self.owner.velocity = (v_up + v_forward * 0.25) * 750;
254 setorigin(self.owner,self.origin - v_forward * 200 + '0 0 64');
259 float raptor_takeoff()
261 entity player, raptor;
264 raptor = self.vehicle;
268 if(raptor.frame < 25)
270 raptor.frame += 0.25;
271 raptor.velocity_z = min(raptor.velocity_z * 1.5, 256);
272 self.bomb1.gun1.avelocity_y = 90 + ((raptor.frame / 25) * 25000);
273 self.bomb1.gun2.avelocity_y = -self.bomb1.gun1.avelocity_y;
274 player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
276 setorigin(player, raptor.origin + '0 0 32');
279 player.PlayerPhysplug = raptor_frame;
287 entity player, raptor;
292 raptor = self.vehicle;
295 if(player.BUTTON_USE && raptor.deadflag == DEAD_NO)
298 vehicles_exit(VHEF_NORMAL);
303 if(raptor.deadflag != DEAD_NO)
306 player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
312 crosshair_trace(player);
314 #if VEHICLES_VIEWROTATE_CROSSHAIR
315 df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
316 if(df_x > 180) df_x -= 360;
317 if(df_x < -180) df_x += 360;
318 if(df_y > 180) df_y -= 360;
319 if(df_y < -180) df_y += 360;
322 ftmp = autocvar_g_vehicle_raptor_turnspeed * sys_frametime;
323 ftmp = bound(-ftmp, shortangle_f(df_y - raptor.angles_y, raptor.angles_y), ftmp);
326 //raptor.angles_y = anglemods(raptor.angles_y + ftmp);
327 raptor.avelocity_y = anglemods(raptor.angles_y + ftmp);
330 ftmp = autocvar_g_vehicle_raptor_pitchspeed * sys_frametime;
331 ftmp = bound(-ftmp, shortangle_f(df_x - raptor.angles_x, raptor.angles_x), ftmp);
333 //raptor.angles_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit);
334 raptor.avelocity_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit);
337 vang = raptor.angles;
338 df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
341 if(df_x > 180) df_x -= 360;
342 if(df_x < -180) df_x += 360;
343 if(df_y > 180) df_y -= 360;
344 if(df_y < -180) df_y += 360;
346 ftmp = shortangle_f(player.v_angle_y - vang_y, vang_y);
347 if(ftmp > 180) ftmp -= 360; if(ftmp < -180) ftmp += 360;
348 raptor.avelocity_y = bound(-autocvar_g_vehicle_raptor_turnspeed, ftmp + raptor.avelocity_y * 0.9, autocvar_g_vehicle_raptor_turnspeed);
352 if(player.movement_x > 0 && vang_x < autocvar_g_vehicle_raptor_pitchlimit) ftmp = 5;
353 else if(player.movement_x < 0 && vang_x > -autocvar_g_vehicle_raptor_pitchlimit) ftmp = -20;
355 df_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x , autocvar_g_vehicle_raptor_pitchlimit);
356 ftmp = vang_x - bound(-autocvar_g_vehicle_raptor_pitchlimit, df_x + ftmp, autocvar_g_vehicle_raptor_pitchlimit);
357 raptor.avelocity_x = bound(-autocvar_g_vehicle_raptor_pitchspeed, ftmp + raptor.avelocity_x * 0.9, autocvar_g_vehicle_raptor_pitchspeed);
359 raptor.angles_x = anglemods(raptor.angles_x);
360 raptor.angles_y = anglemods(raptor.angles_y);
361 raptor.angles_z = anglemods(raptor.angles_z);
365 if(autocvar_g_vehicle_raptor_movestyle == 1)
366 makevectors('0 1 0' * raptor.angles_y);
368 makevectors(player.v_angle);
370 #ifdef RAPTOR_RETARDCAMERA
372 spd = vlen(self.velocity) + 0.01;
373 back = spd / autocvar_g_vehicle_raptor_speed_forward;
381 setorigin(self.vehicle_viewport, self.origin + (v_up * up) + (v_forward * -back));
384 df = raptor.velocity * -autocvar_g_vehicle_raptor_friction;
386 if(player.movement_x != 0)
388 if(player.movement_x > 0)
389 df += v_forward * autocvar_g_vehicle_raptor_speed_forward;
390 else if(player.movement_x < 0)
391 df -= v_forward * autocvar_g_vehicle_raptor_speed_forward;
394 if(player.movement_y != 0)
396 if(player.movement_y < 0)
397 df -= v_right * autocvar_g_vehicle_raptor_speed_strafe;
398 else if(player.movement_y > 0)
399 df += v_right * autocvar_g_vehicle_raptor_speed_strafe;
401 raptor.angles_z = bound(-30,raptor.angles_z + (player.movement_y / autocvar_g_vehicle_raptor_speed_strafe),30);
405 raptor.angles_z *= 0.95;
406 if(raptor.angles_z >= -1 && raptor.angles_z <= -1)
410 if(player.BUTTON_CROUCH)
411 df -= v_up * autocvar_g_vehicle_raptor_speed_down;
412 else if (player.BUTTON_JUMP)
413 df += v_up * autocvar_g_vehicle_raptor_speed_up;
415 raptor.velocity += df * frametime;
416 player.velocity = player.movement = raptor.velocity;
417 setorigin(player,raptor.origin + '0 0 32');
420 // Target lock & predict
421 if(autocvar_g_vehicle_raptor_cannon_locktarget)
424 vehicles_locktarget((1 / autocvar_g_vehicle_raptor_cannon_locking_time) * frametime,
425 (1 / autocvar_g_vehicle_raptor_cannon_locking_releasetime) * frametime,
426 autocvar_g_vehicle_raptor_cannon_locked_time);
428 if(self.lock_target != world)
429 if(autocvar_g_vehicle_raptor_cannon_predicttarget)
430 if(self.lock_strength == 1)
432 float i, distance, impact_time;
434 vf = real_origin(raptor.lock_target);
436 for(i = 0; i < 4; ++i)
438 distance = vlen(ad - raptor.origin);
439 impact_time = distance / autocvar_g_vehicle_raptor_cannon_speed;
440 ad = vf + raptor.lock_target.velocity * impact_time;
443 //UpdateAuxiliaryXhair(player, trace_endpos, '1 1 1', 0);
448 if(raptor.lock_strength == 1)
449 UpdateAuxiliaryXhair(player, real_origin(raptor.lock_target), '1 0 0', 1);
450 else if(self.lock_strength > 0.5)
451 UpdateAuxiliaryXhair(player, real_origin(raptor.lock_target), '0 1 0', 1);
452 else if(self.lock_strength < 0.5)
453 UpdateAuxiliaryXhair(player, real_origin(raptor.lock_target), '0 0 1', 1);
458 ftmp2 = autocvar_g_vehicle_raptor_cannon_turnspeed * frametime;
462 df = gettaginfo(raptor.gun1, gettagindex(raptor.gun1, "fire1"));
465 df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
466 df = shortangle_vxy(df - (raptor.angles + raptor.gun1.angles), raptor.angles + raptor.gun1.angles); // Find aim offset
468 df_x = bound(ftmp, df_x, ftmp2);
469 df_y = bound(ftmp, df_y, ftmp2);
471 raptor.gun1.angles_x = bound(-autocvar_g_vehicle_raptor_cannon_pitchlimit_down, df_x + raptor.gun1.angles_x, autocvar_g_vehicle_raptor_cannon_pitchlimit_up);
472 raptor.gun1.angles_y = bound(-autocvar_g_vehicle_raptor_cannon_turnlimit, df_y + raptor.gun1.angles_y, autocvar_g_vehicle_raptor_cannon_turnlimit);
474 //df = vectoangles(normalize(trace_endpos - df));
477 df = gettaginfo(raptor.gun2, gettagindex(raptor.gun2, "fire1"));
480 df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
481 df = shortangle_vxy(df - (raptor.angles + raptor.gun2.angles), raptor.angles + raptor.gun2.angles); // Find aim offset
483 df_x = bound(ftmp, df_x, ftmp2);
484 df_y = bound(ftmp, df_y, ftmp2);
486 raptor.gun2.angles_x = bound(-autocvar_g_vehicle_raptor_cannon_pitchlimit_down, df_x + raptor.gun2.angles_x, autocvar_g_vehicle_raptor_cannon_pitchlimit_up);
487 raptor.gun2.angles_y = bound(-autocvar_g_vehicle_raptor_cannon_turnlimit, df_y + raptor.gun2.angles_y, autocvar_g_vehicle_raptor_cannon_turnlimit);
491 v_forward = vf * 0.5;
492 traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, raptor);
493 UpdateAuxiliaryXhair(player, trace_endpos, '0 1 0', 0);
496 if(player.BUTTON_ATCK)
497 if(raptor.attack_finished_single <= time)
498 if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
500 raptor.misc_bulletcounter += 1;
501 raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire;
502 if(raptor.misc_bulletcounter <= 2)
503 raptor_fire_cannon(self.gun1, "fire1");
504 else if(raptor.misc_bulletcounter == 3)
505 raptor_fire_cannon(self.gun2, "fire1");
508 raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire * 2;
509 raptor_fire_cannon(self.gun2, "fire1");
510 raptor.misc_bulletcounter = 0;
512 raptor.vehicle_energy -= autocvar_g_vehicle_raptor_cannon_cost;
516 if(self.vehicle_flags & VHF_SHIELDREGEN)
517 vehicles_regen(dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime);
519 if(self.vehicle_flags & VHF_HEALTHREGEN)
520 vehicles_regen(dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime);
522 if(self.vehicle_flags & VHF_ENERGYREGEN)
523 vehicles_regen(cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime);
526 if(time > raptor.delay)
527 if(player.BUTTON_ATCK2)
530 raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
534 player.vehicle_reload1 = (time - raptor.lip) / (raptor.delay - raptor.lip);
535 raptor.bomb1.alpha = raptor.bomb2.alpha = player.vehicle_reload1;
537 VEHICLE_UPDATE_PLAYER(health, raptor);
538 VEHICLE_UPDATE_PLAYER(energy, raptor);
539 if(self.vehicle_flags & VHF_HASSHIELD)
540 VEHICLE_UPDATE_PLAYER(shield, raptor);
544 player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
550 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
551 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
553 self.deadflag = DEAD_DEAD;
554 self.vehicle_exit(VHEF_NORMAL);
555 RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
558 self.movetype = MOVETYPE_NONE;
559 self.effects = EF_NODRAW;
560 self.colormod = '0 0 0';
561 self.avelocity = '0 0 0';
562 self.velocity = '0 0 0';
564 setorigin(self, self.pos1);
565 self.touch = SUB_Null;
571 self.event_damage = SUB_Null;
572 self.iscreature = FALSE;
573 self.solid = SOLID_CORPSE;
574 self.takedamage = DAMAGE_NO;
575 self.deadflag = DEAD_DYING;
576 self.movetype = MOVETYPE_BOUNCE;
578 pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
580 self.velocity_z += 128;
583 self.avelocity_z = 45 + random() * 270;
585 self.avelocity_z = -45 + random() * -270;
587 self.colormod = '-0.5 -0.5 -0.5';
588 self.touch = raptor_blowup;
594 self.vehicle_health = autocvar_g_vehicle_raptor_health;
595 self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
596 self.movetype = MOVETYPE_TOSS;
597 self.solid = SOLID_BBOX;
598 self.vehicle_energy = 1;
600 self.bomb1.gun1.avelocity_y = 90;
601 self.bomb1.gun2.avelocity_y = -90;
603 setsize(self, RAPTOR_MIN, RAPTOR_MAX );
612 if not (vehicle_initialize(
614 "models/vehicles/raptor.dpm",
616 "models/vehicles/raptor_cockpit.dpm",
617 "", "tag_hud", "tag_camera",
619 RAPTOR_MIN, RAPTOR_MAX,
621 raptor_spawn, autocvar_g_vehicle_raptor_respawntime,
623 raptor_enter, raptor_exit,
624 raptor_die, raptor_think))
630 //FIXME: Camera is in a bad place in HUD model.
631 //setorigin(self.vehicle_viewport, '25 0 5');
635 self.bomb1 = spawn();
636 self.bomb2 = spawn();
640 #ifdef RAPTOR_RETARDCAMERA
641 setattachment(self.vehicle_viewport, world, "");
644 setmodel(self.bomb1,"models/vehicles/clusterbomb.md3");
645 setmodel(self.bomb2,"models/vehicles/clusterbomb.md3");
646 setmodel(self.gun1, "models/vehicles/raptor_gun.dpm");
647 setmodel(self.gun2, "models/vehicles/raptor_gun.dpm");
649 setattachment(self.bomb1, self,"bombmount_left");
650 setattachment(self.bomb2, self,"bombmount_right");
653 // FIXME Guns mounts to angled bones
654 self.bomb1.angles = self.angles;
655 self.angles = '0 0 0';
656 // This messes up gun-aim, so work arround it.
657 //setattachment(self.gun1, self, "gunmount_left");
658 ofs = gettaginfo(self, gettagindex(self, "gunmount_left"));
660 setattachment(self.gun1, self, "");
661 setorigin(self.gun1, ofs);
663 //setattachment(self.gun2, self, "gunmount_right");
664 ofs = gettaginfo(self, gettagindex(self, "gunmount_right"));
666 setattachment(self.gun2, self, "");
667 setorigin(self.gun2, ofs);
669 self.angles = self.bomb1.angles;
670 self.bomb1.angles = '0 0 0';
673 spinner.owner = self;
674 setmodel(spinner,"models/vehicles/spinner.dpm");
675 setattachment(spinner, self, "engine_left");
676 spinner.movetype = MOVETYPE_NOCLIP;
677 spinner.avelocity = '0 90 0';
678 self.bomb1.gun1 = spinner;
681 spinner.owner = self;
682 setmodel(spinner,"models/vehicles/spinner.dpm");
683 setattachment(spinner, self, "engine_right");
684 spinner.movetype = MOVETYPE_NOCLIP;
685 spinner.avelocity = '0 -90 0';
686 self.bomb1.gun2 = spinner;
691 void spawnfunc_vehicle_raptor()
693 vehicles_configcheck("vehicle_raptor.cfg", autocvar_g_vehicle_raptor_health);
695 if(autocvar_g_vehicle_raptor_shield)
696 self.vehicle_flags |= VHF_HASSHIELD;
698 if(autocvar_g_vehicle_raptor_shield_regen)
699 self.vehicle_flags |= VHF_SHIELDREGEN;
701 if(autocvar_g_vehicle_raptor_health_regen)
702 self.vehicle_flags |= VHF_HEALTHREGEN;
704 if(autocvar_g_vehicle_raptor_energy_regen)
705 self.vehicle_flags |= VHF_ENERGYREGEN;
707 precache_model ("models/vehicles/raptor.dpm");
708 precache_model ("models/vehicles/raptor_gun.dpm");
709 precache_model ("models/vehicles/spinner.dpm");
710 precache_model ("models/vehicles/raptor_cockpit.dpm");
711 precache_model ("models/vehicles/clusterbomb.md3");
713 self.think = raptor_dinit;
714 self.nextthink = time + 1;