1 #define RAPTOR_MIN '-40 -40 0'
2 #define RAPTOR_MAX '40 40 40'
4 float raptor_movestyle;
5 float raptor_turnspeed;
7 float raptor_pitchspeed;
8 float raptor_speed_forward;
9 float raptor_speed_strafe;
10 float raptor_speed_up;
11 float raptor_speed_down;
13 float raptor_bomblet_waves;
14 float raptor_bomblet_wavefirst;
15 float raptor_bomblet_wavenext;
16 float raptor_bomblet_wawespread;
17 float raptor_bomblets;
18 float raptor_bomblet_damage;
19 float raptor_bomblet_edgedamage;
20 float raptor_bomblet_radius;
21 float raptor_bomblet_force;
22 float raptor_bombs_refire;
24 float raptor_beam_dps;
25 float raptor_beam_fops;
26 float raptor_beam_aps;
27 float raptor_beam_size;
28 float raptor_beam_leangth;
29 float raptor_beam_refire;
31 float raptor_shield_max;
32 float raptor_shield_regen;
34 float raptor_health_max;
35 float raptor_health_regen;
37 float raptor_energy_max;
38 float raptor_energy_regen;
43 float raptor_takeoff();
49 float raptor_altitude(float amax)
51 tracebox(self.origin, self.mins, self.maxs, '0 0 -1' * amax, TRUE, self);
52 if(trace_fraction == 1)
55 return vlen(self.origin - trace_endpos);
58 void raptor_loadsettings()
60 raptor_movestyle = CCVAR("_movestyle");
61 raptor_turnspeed = CCVAR("_turnspeed");
62 raptor_turnroll = CCVAR("_turnroll");
63 raptor_pitchspeed = CCVAR("_pitchspeed");
64 raptor_speed_forward = CCVAR("_speed_forward");
65 raptor_speed_strafe = CCVAR("_speed_strafe");
66 raptor_speed_up = CCVAR("_speed_up");
67 raptor_speed_down = CCVAR("_speed_down");
69 raptor_bomblet_waves = CCVAR("_bomblet_waves ");
70 raptor_bomblet_wavefirst = CCVAR("_bomblet_wavefirst");
71 raptor_bomblet_wavenext = CCVAR("_bomblet_wavenext");
72 raptor_bomblet_wawespread = CCVAR("_bomblet_wawespread");
73 raptor_bomblets = CCVAR("_bomblets");
74 raptor_bomblet_damage = CCVAR("_bomblet_damage");
75 raptor_bomblet_edgedamage = CCVAR("_bomblet_edgedamage");
76 raptor_bomblet_radius = CCVAR("_bomblet_radius");
77 raptor_bomblet_force = CCVAR("_bomblet_force ");
78 raptor_bombs_refire = CCVAR("_bombs_refire");
80 raptor_beam_dps = CCVAR("_beam_dps");
81 raptor_beam_fops = CCVAR("_beam_fops");
82 raptor_beam_aps = CCVAR("_beam_aps");
83 raptor_beam_size = CCVAR("_beam_size");
84 raptor_beam_leangth = CCVAR("_beam_length");
85 raptor_beam_refire = CCVAR("_beam_refire");
87 raptor_shield_max = CCVAR("_shield");
88 raptor_shield_regen = CCVAR("_shield_regen");
90 raptor_health_max = CCVAR("_health");
91 raptor_health_regen = CCVAR("_health_regen");
93 raptor_energy_max = CCVAR("_energy");
94 raptor_energy_regen = CCVAR("_energy_regen");
97 void raptor_bombs_return()
99 self.owner.bomb1.alpha = 1;
100 self.owner.bomb2.alpha = 1;
104 void raptor_bomblet_boom()
106 if(other.enemy == self.enemy)
109 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
110 RadiusDamage (self, self.enemy, raptor_bomblet_damage, raptor_bomblet_edgedamage, raptor_bomblet_radius, world, raptor_bomblet_force, DEATH_SBROCKET, world);
114 void raptor_bomb_burst()
116 self.angles = vectoangles(self.velocity);
124 makevectors(self.angles);
125 v = vlen(self.velocity) + random();
126 d = normalize(self.velocity);
127 pointparticles(particleeffectnum("rocket_explode"), self.origin, '0 0 0', 1);
129 for(i = 0; i < raptor_bomblets; ++i)
133 setorigin(bomblet,self.origin);
135 setmodel(bomblet,"models/vehicles/raptor_bomb.dpm");
138 bomblet.owner = self.owner;
139 bomblet.enemy = self.enemy;
141 bomblet.solid = SOLID_TRIGGER;
142 bomblet.movetype = MOVETYPE_BOUNCE;
143 bomblet.touch = raptor_bomblet_boom;
145 bomblet.think = raptor_bomblet_boom;
146 bomblet.nextthink = time + 5;
148 //bomblet.modelflags = MF_ROCKET;
149 bomblet.modelflags = MF_GRENADE;
151 bomblet.velocity = normalize(d + randomvec() * raptor_bomblet_wawespread) * v;
153 bomblet.angles = vectoangles(bomblet.velocity);
163 self.cnt = time + raptor_bomblet_wavenext;
166 self.nextthink = time;
169 void raptor_bomb_touch()
174 void raptor_bombdrop()
176 entity bomb_1, bomb_2;
178 self.bomb1.alpha = 0.25;
179 self.bomb2.alpha = 0.25;
184 setmodel(bomb_1,"models/vehicles/raptor_bomb.dpm");
185 setmodel(bomb_2,"models/vehicles/raptor_bomb.dpm");
187 setorigin(bomb_1, gettaginfo(self, gettagindex(self, "bombmount_left")));
188 setorigin(bomb_2, gettaginfo(self, gettagindex(self, "bombmount_right")));
190 bomb_1.movetype = bomb_2.movetype = MOVETYPE_TOSS;
191 bomb_1.velocity = bomb_2.velocity = self.velocity;
192 bomb_1.touch = bomb_2.touch = raptor_bomb_touch;
193 bomb_1.think = bomb_2.think = raptor_bomb_burst;
194 bomb_1.nextthink = bomb_2.nextthink = time;
195 bomb_1.cnt = bomb_2.cnt = time + raptor_bomblet_wavefirst;
196 bomb_1.wait = bomb_2.wait = raptor_bomblet_waves;
198 bomb_1.avelocity = bomb_2.avelocity = '0 0 180';
199 bomb_1.owner = bomb_2.owner = self;
200 bomb_1.enemy = bomb_2.enemy = self.owner;
201 bomb_1.angles = bomb_2.angles = self.angles;
202 bomb_1.solid = bomb_2.solid = SOLID_BBOX;
206 bomb_1.think = raptor_bombs_return;
207 bomb_1.nextthink = time + raptor_bombs_refire;
210 void raptor_animator_think()
212 self.owner.frame += 1;
213 if(self.owner.frame == self.cnt)
216 self.nextthink = time + self.wait;
219 void raptor_setanim(float start, float end, float length)
222 if(self.tur_head.enemy)
223 ani = self.tur_head.enemy;
227 self.tur_head.enemy = ani;
231 ani.wait = sys_frametime / length;
232 ani.think = raptor_animator_think;
233 ani.nextthink = time + ani.wait;
236 void raptor_beam (vector start, vector end, vector smin, vector smax, float bforce, float f_dmg, float deathtype)
238 vector hitloc, force, endpoint, dir;
241 dir = normalize(end - start);
242 force = dir * bforce;
244 // go a little bit into the wall because we need to hit this wall later
247 // trace multiple times until we hit a wall, each obstacle will be made unsolid.
248 // note down which entities were hit so we can damage them later
251 tracebox(start, smin, smax, end, FALSE, world);
253 // if it is world we can't hurt it so stop now
254 if (trace_ent == world || trace_fraction == 1)
257 if (trace_ent.solid == SOLID_BSP)
260 // make the entity non-solid so we can hit the next one
261 trace_ent.railgunhit = TRUE;
262 trace_ent.railgunhitloc = end;
263 trace_ent.railgunhitsolidbackup = trace_ent.solid;
265 // make the entity non-solid
266 trace_ent.solid = SOLID_NOT;
269 endpoint = trace_endpos;
271 // find all the entities the railgun hit and hurt them
272 ent = findchainfloat(railgunhit, TRUE);
275 // get the details we need to call the damage function
276 ent.solid = ent.railgunhitsolidbackup;
277 hitloc = ent.railgunhitloc;
278 ent.railgunhitloc = '0 0 0';
279 ent.railgunhitsolidbackup = SOLID_NOT;
280 ent.railgunhit = FALSE;
284 Damage (ent, self, self, f_dmg, deathtype, hitloc, force);
288 trace_endpos = endpoint;
294 // Remove this when bots know how to use vehicles
295 if (clienttype(other) != CLIENTTYPE_REAL)
300 if(self.team != other.team)
304 self.switchweapon = other.switchweapon;
306 self.event_damage = vehicle_stdproc_damage;
307 self.colormap = self.owner.colormap;
308 self.vehicle_hudmodel.viewmodelforclient = self.owner;
310 self.owner.angles = self.angles;
311 self.owner.takedamage = DAMAGE_NO;
312 self.owner.solid = SOLID_NOT;
313 self.owner.movetype = MOVETYPE_NOCLIP;
314 self.owner.alpha = -1;
315 self.owner.PlayerPhysplug = raptor_takeoff;
316 self.owner.vehicle = self;
317 self.owner.event_damage = SUB_Null;
318 self.owner.hud = HUD_RAPTOR;
319 self.owner.vehicle_health = self.vehicle_health / raptor_health_max;
320 self.owner.vehicle_shield = self.vehicle_shield / raptor_shield_max;
321 self.owner.view_ofs = '0 0 1';
322 self.owner.vehicle_ammo1 = self.vehicle_ammo1;
323 self.owner.vehicle_ammo2 = self.vehicle_ammo2;
324 self.owner.vehicle_reload1 = self.vehicle_reload1;
325 self.owner.vehicle_reload2 = self.vehicle_reload2;
327 other.flags &~= FL_ONGROUND;
328 self.flags &~= FL_ONGROUND;
331 raptor_setanim(0, 25, 1);
333 self.team = self.owner.team;
334 self.flags -= FL_NOTARGET;
336 self.velocity = '0 0 1';
338 setorigin(other,self.origin + '0 0 32');
339 other.velocity = self.velocity;
341 other.flags &~= FL_ONGROUND;
343 WriteByte (MSG_ONE, SVC_SETVIEWPORT);
344 WriteEntity( MSG_ONE, self.vehicle_viewport);
346 WriteByte (MSG_ONE, SVC_SETVIEWANGLES); // 10 = SVC_SETVIEWANGLES
347 WriteAngle(MSG_ONE, self.angles_x * -1); // tilt
348 WriteAngle(MSG_ONE, self.angles_y); // yaw
349 WriteAngle(MSG_ONE, 0); // roll
352 void raptor_exit(float eject)
354 self.colormap = 1024;
355 self.flags = FL_NOTARGET;
360 msg_entity = self.owner;
361 WriteByte (MSG_ONE, SVC_SETVIEWPORT);
362 WriteEntity( MSG_ONE, self.owner);
364 WriteByte (MSG_ONE, SVC_SETVIEWANGLES); // 10 = SVC_SETVIEWANGLES
365 WriteAngle(MSG_ONE, 0); // tilt
366 WriteAngle(MSG_ONE, self.angles_y); // yaw
367 WriteAngle(MSG_ONE, 0); // roll
369 if (self.deadflag == DEAD_NO)
371 //self.think = racer_exitthink;
372 self.nextthink = time;
375 self.owner.takedamage = DAMAGE_AIM;
376 self.owner.solid = SOLID_SLIDEBOX;
377 self.owner.movetype = MOVETYPE_WALK;
379 setsize(self.owner,PL_MIN,PL_MAX);
381 self.owner.effects &~= EF_NODRAW;
382 self.owner.alpha = 1;
383 self.owner.PlayerPhysplug = SUB_Null;
384 self.owner.vehicle = world;
385 self.owner.view_ofs = PL_VIEW_OFS;
386 self.owner.event_damage = PlayerDamage;
387 self.owner.hud = HUD_NORMAL;
388 //self.exteriormodeltoclient = self;
390 self.vehicle_hudmodel.viewmodelforclient = self;
394 makevectors(self.angles);
395 setorigin(self.owner,self.origin + v_forward * 100);
396 self.owner.velocity = (v_up + v_forward * 0.25) * 750;
400 self.owner.velocity = (v_forward) * -150;
401 setorigin(self.owner,self.origin - v_forward * 128);
406 if (self.deadflag != DEAD_NO)
411 ret.think = raptor_return;
412 ret.nextthink = time + autocvar_g_vehicle_racer_respawntime;
420 float ftmp, ftmp2, energy_used;
424 if(autocvar_g_vehicle_raptor_reload)
426 raptor_loadsettings();
427 cvar_set("g_vehicle_raptor_reload","0");
434 if(player.BUTTON_USE)
442 if(vhic.deadflag != DEAD_NO)
445 player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
451 ftmp = raptor_turnspeed * sys_frametime;
453 ftmp = bound(-ftmp, shortangle_f(player.v_angle_y - vhic.angles_y, vhic.angles_y), ftmp);
456 //ftmp = bound(-90,shortangle_f(player.v_angle_z + ((vhic.angles_y - ftmp2) * raptor_turnroll), vhic.angles_z),90);
457 //ftmp = safeangle(vhic.angles_z + ftmp);
458 //vhic.angles_z = ftmp;
461 vhic.angles_y = anglemods(vhic.angles_y + ftmp);
464 ftmp = raptor_pitchspeed * sys_frametime;
466 ftmp = bound(-ftmp, shortangle_f(player.v_angle_x - vhic.angles_x,vhic.angles_x), ftmp);
468 vhic.angles_x = bound(-60,anglemods(vhic.angles_x + ftmp),60);
471 if(raptor_movestyle == 1)
473 ftmp = vhic.angles_z;
475 ftmp2 = vhic.angles_x;
477 fixedmakevectors(vhic.angles);
478 vhic.angles_z = ftmp;
479 vhic.angles_x = ftmp2;
482 fixedmakevectors(vhic.angles);
484 df = vhic.velocity * -1;
486 if(player.movement_x != 0)
488 if(player.movement_x > 0)
489 df += v_forward * raptor_speed_forward;
490 else if(player.movement_x < 0)
491 df -= v_forward * raptor_speed_forward;
494 if(player.movement_y != 0)
496 if(player.movement_y < 0)
497 df -= v_right * raptor_speed_strafe;
498 else if(player.movement_y > 0)
499 df += v_right * raptor_speed_strafe;
501 vhic.angles_z = bound(-30,vhic.angles_z + (player.movement_y / raptor_speed_strafe),30);
505 vhic.angles_z *= 0.95;
506 if(vhic.angles_z >= -1 && vhic.angles_z <= -1)
510 if(player.BUTTON_CROUCH)
511 df -= v_up * raptor_speed_down;
512 else if (player.BUTTON_JUMP)
513 df += v_up * raptor_speed_up;
515 //df_z = vhic.velocity_z * -1;
517 vhic.velocity += df * frametime;
518 player.velocity = player.movement = vhic.velocity;
519 setorigin(player,vhic.origin + '0 0 32');
523 vector target_angle, move_angle, org1, org2, targ;
525 makevectors(player.v_angle);
527 //targ = (vhic.origin + player.view_ofs) + v_forward * MAX_SHOT_DISTANCE;
528 targ = player.cursor_trace_endpos;
530 org1 = gettaginfo(vhic.gun1,gettagindex(vhic.gun1, "fire1"));
531 org2 = gettaginfo(vhic.gun2,gettagindex(vhic.gun2, "fire1"));
533 traceline(vhic.origin + player.view_ofs, targ, FALSE, vhic);
536 // Find the direction
537 target_angle = vectoangles(normalize(targ - org1)); // And make a angle
539 // Find the diffrence between where we currently aim and where we want to aim
540 move_angle = target_angle - (vhic.angles + vhic.gun1.angles);
541 move_angle = shortangle_vxy(move_angle,(vhic.angles + vhic.gun1.angles));
542 vhic.gun1.angles_x = bound(-10, move_angle_x + vhic.gun1.angles_x, 10);
543 vhic.gun1.angles_y = bound(-15, move_angle_y + vhic.gun1.angles_y, 15);
545 // Find the direction
546 target_angle = vectoangles(normalize(targ - org2)); // And make a angle
548 move_angle = target_angle - (vhic.angles + vhic.gun2.angles);
549 move_angle = shortangle_vxy(move_angle,(vhic.angles + vhic.gun2.angles));
550 vhic.gun2.angles_x = bound(-15,move_angle_x + vhic.gun2.angles_x,15);
551 vhic.gun2.angles_y = bound(-20,move_angle_y + vhic.gun2.angles_y,20);
553 if(player.BUTTON_ATCK)
554 if(vhic.vehicle_energy > (raptor_beam_aps * sys_frametime))
559 start = gettaginfo(vhic.gun1, gettagindex(vhic.gun1, "fire1"));
560 traceline(start, start + v_forward * MAX_SHOT_DISTANCE, TRUE, player);
561 te_lightning1(vhic.gun1, start, trace_endpos);
562 raptor_beam(start, trace_endpos, '-1 -1 -1' * raptor_beam_size, '1 1 1' * raptor_beam_size, raptor_beam_fops * sys_frametime, raptor_beam_dps * sys_frametime, DEATH_SBROCKET);
565 start = gettaginfo(vhic.gun2, gettagindex(vhic.gun2, "fire1"));
566 traceline(start, start + v_forward * MAX_SHOT_DISTANCE, TRUE, player);
567 te_lightning1(vhic.gun2, start, trace_endpos);
568 raptor_beam(start, trace_endpos, '-1 -1 -1' * raptor_beam_size, '1 1 1' * raptor_beam_size, raptor_beam_fops * sys_frametime, raptor_beam_dps * sys_frametime, DEATH_SBROCKET);
572 vhic.vehicle_energy -= raptor_beam_aps * sys_frametime;
577 vhic.vehicle_energy = min(vhic.vehicle_energy += raptor_energy_regen * frametime, raptor_energy_max);
579 player.vehicle_energy = vhic.vehicle_energy / raptor_energy_max;
582 if(player.BUTTON_ATCK2)
583 if(time > vhic.delay)
586 vhic.delay = time + raptor_bombs_refire;
589 player.BUTTON_ATCK = player.BUTTON_ATCK2 = player.BUTTON_CROUCH = 0;
590 vehicle_stdproc_shiledregen(raptor_shield_max, frametime);
591 vehicle_stdproc_healthregen(raptor_health_max, frametime);
598 float raptor_takeoff()
602 if(self.vehicle.frame < 25)
609 if(raptor_altitude(512) <= 256)
611 vhic.velocity_z = min(vhic.velocity_z * 1.5, 256);
615 player.PlayerPhysplug = raptor_pplug;
618 player.BUTTON_CROUCH = player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
631 pointparticles(particleeffectnum("teleport"), self.enemy.origin + '0 0 64', '0 0 0', 1);
632 self.enemy.think = raptor_spawn;
633 self.enemy.nextthink = time;
645 if(vlen(self.velocity) == 0)
648 if(other.classname != "player")
654 if(other.classname != "player")
657 if(other.deadflag != DEAD_NO)
660 if(other.vehicle != world)
669 self.event_damage = SUB_Null;
670 self.iscreature = FALSE;
671 self.solid = SOLID_NOT;
672 self.takedamage = DAMAGE_NO;
673 //self.touch = racer_dietouch;
674 self.deadflag = DEAD_DYING;
675 self.movetype = MOVETYPE_BOUNCE;
678 pointparticles(particleeffectnum("rocket_explode"), findbetterlocation (self.origin, 16), '0 0 0', 1);
680 self.velocity += '0 0 128';
683 self.avelocity_z = 45;
685 self.avelocity_z = -45;
687 self.colormod = '-0.5 -0.5 -0.5';
689 self.think = raptor_spawn;
690 self.nextthink = time + 5;
695 self.flags = FL_NOTARGET;
698 self.vehicle_health = raptor_health_max;
699 self.vehicle_shield = raptor_shield_max;
701 self.event_damage = vehicle_stdproc_damage;
702 self.touch = raptor_touch;
704 self.iscreature = TRUE;
705 self.movetype = MOVETYPE_FLY;
706 self.solid = SOLID_SLIDEBOX;
707 self.takedamage = DAMAGE_AIM;
710 self.colormap = 1024;
711 self.deadflag = DEAD_NO;
712 self.bot_attack = TRUE;
714 self.colormod = '1 1 1';
715 self.avelocity = '0 0 0';
716 self.velocity = '0 0 0';
718 self.vehicle_energy = 1;
719 self.vehicle_hudmodel.viewmodelforclient = self;
721 setorigin(self, self.pos1);
722 self.angles = self.pos2;
724 setsize(self,RAPTOR_MIN ,RAPTOR_MAX );
725 pointparticles(particleeffectnum("teleport"), self.origin + '0 0 64', '0 0 0', 1);
729 float raptor_customizeentityforclient()
731 if(self.deadflag == DEAD_DEAD)
735 if(other == self.owner)
747 if (self.netname == "")
748 self.netname = "Raptor";
750 setorigin(self, self.origin);
754 setmodel(self,"models/vehicles/raptor.dpm");
756 self.bomb1 = spawn();
757 self.bomb2 = spawn();
759 setmodel(self.bomb1,"models/vehicles/raptor_bomb.dpm");
760 setmodel(self.bomb2,"models/vehicles/raptor_bomb.dpm");
762 setattachment(self.bomb1, self,"bombmount_left");
763 setattachment(self.bomb2, self,"bombmount_right");
766 if not (self.vehicle_hudmodel)
768 self.vehicle_hudmodel = spawn();
769 setmodel(self.vehicle_hudmodel, "models/vehicles/raptor_cockpit.dpm");
770 //setattachment(self.vehicle_hudmodel, self, "tag_viewport");
771 setattachment(self.vehicle_hudmodel, self, "tag_hud");
774 if not (self.vehicle_viewport)
776 self.vehicle_viewport = spawn();
777 setmodel (self.vehicle_viewport, "null");
778 setattachment(self.vehicle_viewport, self.vehicle_hudmodel, "tag_camera");
784 setmodel(self.gun1, "models/vehicles/raptor_gun.dpm");
785 setattachment(self.gun1, self, "gunmount_left");
791 setmodel(self.gun2, "models/vehicles/raptor_gun.dpm");
792 setattachment(self.gun2, self, "gunmount_right");
795 self.tur_head = spawn();
796 self.pos1 = self.origin;
797 self.pos2 = self.angles;
799 self.vehicle_hudmodel.viewmodelforclient = self;
800 self.customizeentityforclient = raptor_customizeentityforclient;
802 self.vehicle_die = raptor_die;
803 self.vehicle_exit = raptor_exit;
808 spinner.owner = self;
809 setmodel(spinner,"models/vehicles/spinner.dpm");
810 setattachment(spinner, self, "engine_left");
811 spinner.movetype = MOVETYPE_NOCLIP;
812 spinner.avelocity = '0 90 0';
815 spinner.owner = self;
816 setmodel(spinner,"models/vehicles/spinner.dpm");
817 setattachment(spinner, self, "engine_right");
818 spinner.movetype = MOVETYPE_NOCLIP;
819 spinner.avelocity = '0 -90 0';
821 addstat(STAT_HUD, AS_INT, hud);
822 addstat(STAT_VEHICLESTAT_HEALTH, AS_FLOAT, vehicle_health);
823 addstat(STAT_VEHICLESTAT_SHIELD, AS_FLOAT, vehicle_shield);
824 addstat(STAT_VEHICLESTAT_ENERGY, AS_FLOAT, vehicle_energy);
826 addstat(STAT_VEHICLESTAT_AMMO1, AS_INT, vehicle_ammo1);
827 addstat(STAT_VEHICLESTAT_RELOAD1, AS_FLOAT, vehicle_reload1);
829 addstat(STAT_VEHICLESTAT_AMMO2, AS_INT, vehicle_ammo2);
830 addstat(STAT_VEHICLESTAT_RELOAD2, AS_FLOAT, vehicle_reload2);
835 void spawnfunc_vehicle_raptor()
837 self.cvar_basename = "g_vehicle_raptor";
838 raptor_loadsettings();
840 self.vehicle_flags = VHF_HASSHIELD | VHF_SHIELDREGEN;
842 traceline(self.origin, self.origin - '0 0 2048', MOVE_WORLDONLY, self);
845 dprint("WARNING: vehicle_raptor placed in solid\n");
846 traceline(self.origin + '0 0 512' ,self.origin - '0 0 2048',MOVE_WORLDONLY,self);
847 if(trace_startsolid || trace_fraction == 1.0)
849 dprint("ERROR: vehicle_raptor placed in more then 512 units into solid\n");
855 if(trace_fraction != 1.0)
856 setorigin(self,trace_endpos + '0 0 8');
858 dprint("WARNING: vehicle_racer placed more then 2048 units above ground.\n");
860 precache_model ("models/vehicles/raptor.dpm");
861 precache_model ("models/vehicles/raptor_gun.dpm");
862 precache_model ("models/vehicles/spinner.dpm");
863 precache_model ("models/vehicles/raptor_cockpit.dpm");
864 precache_model ("models/vehicles/raptor_bomb.dpm");
867 self.think = raptor_dinit;
868 self.nextthink = time + 1;
872 void spawnfunc_vehicle_raptor2()
876 precache_model ("models/vehicles/test.iqm");
877 precache_model ("models/vehicles/test.dpm");
878 precache_model ("models/vehicles/test.md3");
883 iqm.scale = md3.scale = dpm.scale = 10;
885 //setmodel(iqm,"models/vehicles/test.iqm");
886 //setmodel(dpm,"models/vehicles/test.dpm");
887 setmodel(md3,"models/vehicles/test.md3");
889 setorigin(iqm, self.origin + '0 0 16');
890 setorigin(dpm, self.origin + '0 20 32');
891 setorigin(iqm, self.origin + '0 40 48');