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;
16 float autocvar_g_vehicle_raptor_bomblets;
17 float autocvar_g_vehicle_raptor_bomblet_alt;
18 float autocvar_g_vehicle_raptor_bomblet_time;
19 float autocvar_g_vehicle_raptor_bomblet_damage;
20 float autocvar_g_vehicle_raptor_bomblet_spread;
21 float autocvar_g_vehicle_raptor_bomblet_edgedamage;
22 float autocvar_g_vehicle_raptor_bomblet_radius;
23 float autocvar_g_vehicle_raptor_bomblet_force;
24 float autocvar_g_vehicle_raptor_bombs_refire;
26 float autocvar_g_vehicle_raptor_guns_turnspeed;
27 float autocvar_g_vehicle_raptor_guns_turnlimit;
28 float autocvar_g_vehicle_raptor_guns_pitchlimit_up;
29 float autocvar_g_vehicle_raptor_guns_pitchlimit_down;
31 float autocvar_g_vehicle_raptor_cannon_locktarget;
32 float autocvar_g_vehicle_raptor_cannon_locking_time;
33 float autocvar_g_vehicle_raptor_cannon_locking_releasetime;
34 float autocvar_g_vehicle_raptor_cannon_locked_time;
35 float autocvar_g_vehicle_raptor_cannon_predicttarget;
37 float autocvar_g_vehicle_raptor_cannon_cost;
38 float autocvar_g_vehicle_raptor_cannon_damage;
39 float autocvar_g_vehicle_raptor_cannon_radius;
40 float autocvar_g_vehicle_raptor_cannon_refire;
41 float autocvar_g_vehicle_raptor_cannon_speed;
42 float autocvar_g_vehicle_raptor_cannon_spread;
45 float autocvar_g_vehicle_raptor_energy;
46 float autocvar_g_vehicle_raptor_energy_regen;
47 float autocvar_g_vehicle_raptor_energy_regen_pause;
49 float autocvar_g_vehicle_raptor_health;
50 float autocvar_g_vehicle_raptor_health_regen;
51 float autocvar_g_vehicle_raptor_health_regen_pause;
53 float autocvar_g_vehicle_raptor_shield;
54 float autocvar_g_vehicle_raptor_shield_regen;
55 float autocvar_g_vehicle_raptor_shield_regen_pause;
58 //void raptor_return();
60 //float raptor_takeoff();
66 float raptor_altitude(float amax)
68 tracebox(self.origin, self.mins, self.maxs, self.origin - ('0 0 1' * amax), TRUE, self);
69 return vlen(self.origin - trace_endpos);
72 void raptor_bomblet_boom()
74 if(other == self.owner || other.owner == self.owner)
77 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
78 RadiusDamage (self, self.enemy, autocvar_g_vehicle_raptor_bomblet_damage,
79 autocvar_g_vehicle_raptor_bomblet_edgedamage,
80 autocvar_g_vehicle_raptor_bomblet_radius, world,
81 autocvar_g_vehicle_raptor_bomblet_force, DEATH_SBROCKET, world);
85 void raptor_bomb_burst()
87 if(autocvar_g_vehicle_raptor_bomblet_alt)
89 self.nextthink = time;
90 // FIXME: this can make bombs stic forever if fierd at low altitude and land close to vehicle.
91 traceline(self.origin, self.origin + (normalize(self.velocity) * autocvar_g_vehicle_raptor_bomblet_alt), MOVE_NORMAL, self);
92 if(trace_fraction == 1.0)
95 if(vlen(self.origin - self.owner.origin) < autocvar_g_vehicle_raptor_bomblet_radius)
102 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
104 for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
107 setorigin(bomblet, self.origin);
110 bomblet.solid = SOLID_TRIGGER;
111 bomblet.movetype = MOVETYPE_BOUNCE;
112 bomblet.touch = raptor_bomblet_boom;
113 bomblet.think = raptor_bomblet_boom;
114 bomblet.nextthink = time + 5;
115 bomblet.owner = self.owner;
116 bomblet.velocity = normalize(normalize(self.velocity) + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * vlen(self.velocity);
118 CSQCProjectile(bomblet, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
124 void raptor_bomb_touch()
129 void raptor_bombdrop()
131 entity bomb_1, bomb_2;
133 //self.bomb1.alpha = 0;
134 //self.bomb2.alpha = 0;
139 setorigin(bomb_1, gettaginfo(self, gettagindex(self, "bombmount_left")));
140 setorigin(bomb_2, gettaginfo(self, gettagindex(self, "bombmount_right")));
142 bomb_1.movetype = bomb_2.movetype = MOVETYPE_TOSS;
143 bomb_1.velocity = bomb_2.velocity = self.velocity;
144 bomb_1.touch = bomb_2.touch = raptor_bomb_touch;
145 bomb_1.think = bomb_2.think = raptor_bomb_burst;
147 if(autocvar_g_vehicle_raptor_bomblet_alt)
148 bomb_1.nextthink = bomb_2.nextthink = time;
150 bomb_1.nextthink = bomb_2.nextthink = time + autocvar_g_vehicle_raptor_bomblet_time;
152 bomb_1.owner = bomb_2.owner = self;
153 bomb_1.enemy = bomb_2.enemy = self.owner;
154 bomb_1.solid = bomb_2.solid = SOLID_BBOX;
156 CSQCProjectile(bomb_1, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
157 CSQCProjectile(bomb_2, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
161 void raptor_bolt_explode()
164 pointparticles(particleeffectnum("raptor_cannon_impact"), findbetterlocation (self.origin, 8), trace_plane_normal * 1000, 1);
165 RadiusDamage (self, self.realowner, autocvar_g_vehicle_raptor_cannon_damage, 0, autocvar_g_vehicle_raptor_cannon_radius, world, 25, DEATH_WAKIGUN, world);
166 sound (self, CHAN_PROJECTILE, "weapons/laserimpact.wav", VOL_BASE, ATTN_NORM);
170 void raptor_fire_cannon(entity gun, string tagname)
176 PROJECTILE_MAKETRIGGER(bolt);
177 sound (gun, CHAN_WEAPON, "weapons/lasergun_fire.wav", VOL_BASE, ATTN_NORM);
178 setorigin(bolt, gettaginfo(gun, gettagindex(gun, tagname)));
180 bolt.movetype = MOVETYPE_FLYMISSILE;
181 bolt.flags = FL_PROJECTILE | FL_NOTARGET;
183 bolt.realowner = self.owner;
184 bolt.touch = raptor_bolt_explode;
185 bolt.think = raptor_bolt_explode;
186 bolt.nextthink = time + 9;
187 bolt.bot_dodge = TRUE;
188 bolt.bot_dodgerating = autocvar_g_vehicle_raptor_cannon_damage;
189 bolt.velocity = normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed;
191 pointparticles(particleeffectnum("raptor_cannon_muzzleflash"), bolt.origin, bolt.velocity, 1);
192 //pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), bolt.origin, bolt.velocity, 1);
194 CSQCProjectile(bolt, TRUE, PROJECTILE_CRYLINK, TRUE);
203 self.movetype = MOVETYPE_BOUNCEMISSILE;
204 self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_raptor_health);
205 self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_raptor_shield);
207 //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_BOUNCE;
229 self.think = raptor_think;
232 self.nextthink = time;
235 void raptor_exit(float eject)
238 if(self.deadflag == DEAD_NO)
240 vehicles_setreturn(autocvar_g_vehicle_raptor_respawntime, raptor_spawn);
241 self.think = raptor_land;
242 self.nextthink = time;
248 makevectors(self.angles);
251 setorigin(self.owner,self.origin + v_forward * 100 + '0 0 64');
252 self.owner.velocity = (v_up + v_forward * 0.25) * 750;
255 setorigin(self.owner,self.origin - v_forward * 200 + '0 0 64');
262 entity player, raptor;
267 raptor = self.vehicle;
270 if(player.BUTTON_USE)
273 vehicles_exit(VHEF_NORMAL);
278 if(raptor.deadflag != DEAD_NO)
281 player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
286 if(raptor.frame < 25)
288 raptor.frame += 0.25;
289 raptor.velocity_z = min(raptor.velocity_z * 1.5, 256);
290 self.bomb1.gun1.avelocity_y = 90 + ((raptor.frame / 25) * 2000);
291 self.bomb1.gun2.avelocity_y = -self.bomb1.gun1.avelocity_y;
292 player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
298 raptor.angles_x *= -1;
300 ftmp = autocvar_g_vehicle_raptor_turnspeed * sys_frametime;
301 ftmp = bound(-ftmp, shortangle_f(player.v_angle_y - raptor.angles_y, raptor.angles_y), ftmp);
304 raptor.angles_y = anglemods(raptor.angles_y + ftmp);
307 ftmp = autocvar_g_vehicle_raptor_pitchspeed * sys_frametime;
308 ftmp = bound(-ftmp, shortangle_f(player.v_angle_x - raptor.angles_x, raptor.angles_x), ftmp);
310 raptor.angles_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit);
311 raptor.angles_x *= -1;
313 if(autocvar_g_vehicle_raptor_movestyle == 1)
315 ftmp = raptor.angles_z;
317 ftmp2 = raptor.angles_x;
319 fixedmakevectors(raptor.angles);
320 raptor.angles_z = ftmp;
321 raptor.angles_x = ftmp2;
324 makevectors(player.v_angle);
327 crosshair_trace(player);
328 //df = vectoangles(normalize(trace_endpos - gettaginfo(raptor ,gettagindex(raptor, "tag_hud"))) - raptor.angles);
329 df = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
330 if(df_x > 180) df_x -= 360;
331 if(df_x < -180) df_x += 360;
332 if(df_y > 180) df_y -= 360;
333 if(df_y < -180) df_y += 360;
335 //raptor.angles_x *= -1;
337 ftmp = autocvar_g_vehicle_raptor_turnspeed * sys_frametime;
338 ftmp = bound(-ftmp, shortangle_f(df_y - raptor.angles_y, raptor.angles_y), ftmp);
341 raptor.angles_y = anglemods(raptor.angles_y + ftmp);
344 ftmp = autocvar_g_vehicle_raptor_pitchspeed * sys_frametime;
345 ftmp = bound(-ftmp, shortangle_f(df_x - raptor.angles_x, raptor.angles_x), ftmp);
347 raptor.angles_x = bound(-autocvar_g_vehicle_raptor_pitchlimit, anglemods(raptor.angles_x + ftmp), autocvar_g_vehicle_raptor_pitchlimit);
348 //raptor.angles_x *= -1;
350 if(autocvar_g_vehicle_raptor_movestyle == 1)
352 ftmp = raptor.angles_z;
354 ftmp2 = raptor.angles_x;
356 fixedmakevectors(raptor.angles);
357 raptor.angles_z = ftmp;
358 raptor.angles_x = ftmp2;
361 makevectors(player.v_angle);
366 float dist, spd, back, up;
367 //dist = normalize(self.vehicle_viewport.origin - self.origin);
368 spd = vlen(self.velocity) + 0.01;
369 back = spd / autocvar_g_vehicle_raptor_speed_forward;
377 setorigin(self.vehicle_viewport, self.origin + (v_up * up) + (v_forward * -back));
380 df = raptor.velocity * -1;
382 if(player.movement_x != 0)
384 if(player.movement_x > 0)
385 df += v_forward * autocvar_g_vehicle_raptor_speed_forward;
386 else if(player.movement_x < 0)
387 df -= v_forward * autocvar_g_vehicle_raptor_speed_forward;
390 if(player.movement_y != 0)
392 if(player.movement_y < 0)
393 df -= v_right * autocvar_g_vehicle_raptor_speed_strafe;
394 else if(player.movement_y > 0)
395 df += v_right * autocvar_g_vehicle_raptor_speed_strafe;
397 raptor.angles_z = bound(-30,raptor.angles_z + (player.movement_y / autocvar_g_vehicle_raptor_speed_strafe),30);
401 raptor.angles_z *= 0.95;
402 if(raptor.angles_z >= -1 && raptor.angles_z <= -1)
406 if(player.BUTTON_CROUCH)
407 df -= v_up * autocvar_g_vehicle_raptor_speed_down;
408 else if (player.BUTTON_JUMP)
409 df += v_up * autocvar_g_vehicle_raptor_speed_up;
411 raptor.velocity += df * frametime;
412 player.velocity = player.movement = raptor.velocity;
413 setorigin(player,raptor.origin + '0 0 32');
416 // Target lock & predict
417 if(autocvar_g_vehicle_raptor_cannon_locktarget)
420 vehicles_locktarget2((1 / autocvar_g_vehicle_raptor_cannon_locking_time) * frametime,
421 (1 / autocvar_g_vehicle_raptor_cannon_locking_releasetime) * frametime,
422 autocvar_g_vehicle_raptor_cannon_locked_time);
424 if(autocvar_g_vehicle_raptor_cannon_predicttarget && self.lock_strength == 1)
427 if(self.lock_target != world)
429 float i, distance, impact_time;
431 vf = real_origin(raptor.lock_target);
434 for(i = 0; i < 4; ++i)
437 distance = vlen(ad - o);
438 impact_time = distance / autocvar_g_vehicle_raptor_cannon_speed;
439 ad = vf + raptor.lock_target.velocity * impact_time;
440 o = raptor.origin + raptor.velocity * impact_time;
446 if(self.lock_target != world)
447 if(self.lock_strength == 1)
448 UpdateAuxiliaryXhair(player, real_origin(self.lock_target), '0 0 1', 1);
450 UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * (1 - self.lock_strength)) + '0 1 0' * self.lock_strength, 1);
454 ftmp2 = autocvar_g_vehicle_raptor_guns_turnspeed * frametime;
458 df = gettaginfo(raptor.gun1, gettagindex(raptor.gun1, "fire1"));
461 df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
462 df = shortangle_vxy(df - (raptor.angles + raptor.gun1.angles), raptor.angles + raptor.gun1.angles); // Find aim offset
464 df_x = bound(ftmp, df_x, ftmp2);
465 df_y = bound(ftmp, df_y, ftmp2);
467 raptor.gun1.angles_x = bound(-autocvar_g_vehicle_raptor_guns_pitchlimit_down, df_x + raptor.gun1.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit_up);
468 raptor.gun1.angles_y = bound(-autocvar_g_vehicle_raptor_guns_turnlimit, df_y + raptor.gun1.angles_y, autocvar_g_vehicle_raptor_guns_turnlimit);
471 df = gettaginfo(raptor.gun2, gettagindex(raptor.gun2, "fire1"));
474 df = vectoangles(normalize(trace_endpos - df)); // Find the direction & angle
475 df = shortangle_vxy(df - (raptor.angles + raptor.gun2.angles), raptor.angles + raptor.gun2.angles); // Find aim offset
477 df_x = bound(ftmp, df_x, ftmp2);
478 df_y = bound(ftmp, df_y, ftmp2);
480 raptor.gun2.angles_x = bound(-autocvar_g_vehicle_raptor_guns_pitchlimit_down, df_x + raptor.gun2.angles_x, autocvar_g_vehicle_raptor_guns_pitchlimit_up);
481 raptor.gun2.angles_y = bound(-autocvar_g_vehicle_raptor_guns_turnlimit, df_y + raptor.gun2.angles_y, autocvar_g_vehicle_raptor_guns_turnlimit);
486 v_forward = vf * 0.5;
487 traceline(ad, ad + v_forward * MAX_SHOT_DISTANCE, MOVE_NORMAL, raptor);
488 UpdateAuxiliaryXhair(player, trace_endpos, '0 1 0', 0);
491 if(player.BUTTON_ATCK)
492 if(raptor.attack_finished_single <= time)
493 if(raptor.vehicle_energy > autocvar_g_vehicle_raptor_cannon_cost)
495 raptor_fire_cannon(self.gun1, "fire1");
496 raptor_fire_cannon(self.gun2, "fire1");
498 raptor.vehicle_energy -= autocvar_g_vehicle_raptor_cannon_cost;
499 raptor.attack_finished_single = time + autocvar_g_vehicle_raptor_cannon_refire;
503 if(self.vehicle_flags & VHF_SHIELDREGEN)
504 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);
506 if(self.vehicle_flags & VHF_HEALTHREGEN)
507 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);
509 if(self.vehicle_flags & VHF_ENERGYREGEN)
510 vehicles_regen(cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime);
512 player.vehicle_energy = raptor.vehicle_energy / autocvar_g_vehicle_raptor_energy;
515 if(time > raptor.delay)
517 if(player.BUTTON_ATCK2)
520 raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
522 player.vehicle_reload1 = 1;
526 player.vehicle_reload1 = min(time / raptor.delay, 1);
527 raptor.bomb1.alpha = raptor.bomb2.alpha = player.vehicle_reload1; //(player.vehicle_reload1 == 1 ? 1 : player.vehicle_reload1 * 0.25);
532 VEHICLE_UPDATE_PLAYER(health, raptor);
534 if(self.vehicle_flags & VHF_HASSHIELD)
535 VEHICLE_UPDATE_PLAYER(shield, raptor);
537 player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
545 if(vlen(self.velocity) == 0)
548 if(other.classname != "player")
554 if(other.classname != "player")
557 if(other.deadflag != DEAD_NO)
560 if(other.vehicle != world)
568 sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
569 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
571 self.deadflag = DEAD_DEAD;
572 self.vehicle_exit(VHEF_NORMAL);
573 RadiusDamage (self, self, 250, 15, 250, world, 250, DEATH_WAKIBLOWUP, world);
576 self.movetype = MOVETYPE_NONE;
577 self.effects = EF_NODRAW;
578 self.colormod = '0 0 0';
579 self.avelocity = '0 0 0';
580 self.velocity = '0 0 0';
582 setorigin(self, self.pos1);
583 self.touch = SUB_Null;
589 self.event_damage = SUB_Null;
590 self.iscreature = FALSE;
591 self.solid = SOLID_CORPSE;
592 self.takedamage = DAMAGE_NO;
593 self.deadflag = DEAD_DYING;
594 self.movetype = MOVETYPE_BOUNCE;
597 pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
599 self.velocity_z += 128;
602 self.avelocity_z = 45 + random() * 270;
604 self.avelocity_z = -45 + random() * -270;
606 self.colormod = '-0.5 -0.5 -0.5';
608 self.touch = raptor_blowup;
609 self.think = raptor_spawn;
610 self.nextthink = time + autocvar_g_vehicle_raptor_respawntime;
615 self.flags = FL_NOTARGET;
618 self.vehicle_health = autocvar_g_vehicle_raptor_health;
619 self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
620 self.event_damage = vehicles_damage;
621 self.touch = raptor_touch;
622 self.iscreature = TRUE;
623 self.movetype = MOVETYPE_FLY;
624 self.solid = SOLID_SLIDEBOX;
625 self.takedamage = DAMAGE_AIM;
626 self.deadflag = DEAD_NO;
627 self.bot_attack = TRUE;
628 self.vehicle_energy = 1;
629 self.vehicle_hudmodel.viewmodelforclient = self;
631 self.bomb1.gun1.avelocity_y = 90;
632 self.bomb1.gun2.avelocity_y = -90;
635 setorigin(self, self.pos1);
636 self.angles = self.pos2;
638 setsize(self, RAPTOR_MIN, RAPTOR_MAX );
639 pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
642 vehicles_common_spawn();
650 if not (vehicle_initialize(
652 "models/vehicles/raptor.dpm",
654 "models/vehicles/raptor_cockpit.dpm",
655 "", "tag_hud", "tag_camera",
657 RAPTOR_MIN, RAPTOR_MAX,
659 raptor_spawn, raptor_frame,
660 raptor_enter, raptor_exit,
661 raptor_die, raptor_think))
667 //FIXME: Camera is in a bad place in HUD model.
668 setorigin(self.vehicle_viewport, '10 0 3');
672 self.bomb1 = spawn();
673 self.bomb2 = spawn();
677 //setattachment(self.vehicle_viewport, world, "");
679 setmodel(self.bomb1,"models/vehicles/raptor_bomb.dpm");
680 setmodel(self.bomb2,"models/vehicles/raptor_bomb.dpm");
681 setmodel(self.gun1, "models/vehicles/raptor_gun.dpm");
682 setmodel(self.gun2, "models/vehicles/raptor_gun.dpm");
684 setattachment(self.bomb1, self,"bombmount_left");
685 setattachment(self.bomb2, self,"bombmount_right");
688 // FIXME Guns mounts to angled bones
689 self.bomb1.angles = self.angles;
690 self.angles = '0 0 0';
691 // This messes up gun-aim, so work arround it.
692 //setattachment(self.gun1, self, "gunmount_left");
693 ofs = gettaginfo(self, gettagindex(self, "gunmount_left"));
695 setattachment(self.gun1, self, "");
696 setorigin(self.gun1, ofs);
698 //setattachment(self.gun2, self, "gunmount_right");
699 ofs = gettaginfo(self, gettagindex(self, "gunmount_right"));
701 setattachment(self.gun2, self, "");
702 setorigin(self.gun2, ofs);
704 self.angles = self.bomb1.angles;
705 self.bomb1.angles = '0 0 0';
709 spinner.owner = self;
710 setmodel(spinner,"models/vehicles/spinner.dpm");
711 setattachment(spinner, self, "engine_left");
712 spinner.movetype = MOVETYPE_NOCLIP;
713 spinner.avelocity = '0 90 0';
714 self.bomb1.gun1 = spinner;
717 spinner.owner = self;
718 setmodel(spinner,"models/vehicles/spinner.dpm");
719 setattachment(spinner, self, "engine_right");
720 spinner.movetype = MOVETYPE_NOCLIP;
721 spinner.avelocity = '0 -90 0';
722 self.bomb1.gun2 = spinner;
725 void spawnfunc_vehicle_raptor()
727 vehicles_configcheck("vehicle_raptor.cfg", autocvar_g_vehicle_raptor_health);
729 if(autocvar_g_vehicle_raptor_shield)
730 self.vehicle_flags |= VHF_HASSHIELD;
732 if(autocvar_g_vehicle_raptor_shield_regen)
733 self.vehicle_flags |= VHF_SHIELDREGEN;
735 if(autocvar_g_vehicle_raptor_health_regen)
736 self.vehicle_flags |= VHF_HEALTHREGEN;
738 if(autocvar_g_vehicle_raptor_energy_regen)
739 self.vehicle_flags |= VHF_ENERGYREGEN;
741 precache_model ("models/vehicles/raptor.dpm");
742 precache_model ("models/vehicles/raptor_gun.dpm");
743 precache_model ("models/vehicles/spinner.dpm");
744 precache_model ("models/vehicles/raptor_cockpit.dpm");
745 precache_model ("models/vehicles/raptor_bomb.dpm");
747 self.think = raptor_dinit;
748 self.nextthink = time + 1;