- METHOD(Raptor, vr_impact, void(Raptor thisveh))
- {
- if(autocvar_g_vehicle_raptor_bouncepain)
- vehicles_impact(autocvar_g_vehicle_raptor_bouncepain_x, autocvar_g_vehicle_raptor_bouncepain_y, autocvar_g_vehicle_raptor_bouncepain_z);
- }
- METHOD(Raptor, vr_enter, void(Raptor thisveh))
- {
- self.vehicle_weapon2mode = RSM_BOMB;
- self.owner.PlayerPhysplug = raptor_takeoff;
- self.movetype = MOVETYPE_BOUNCEMISSILE;
- self.solid = SOLID_SLIDEBOX;
- self.owner.vehicle_health = (self.vehicle_health / autocvar_g_vehicle_raptor_health) * 100;
- self.owner.vehicle_shield = (self.vehicle_shield / autocvar_g_vehicle_raptor_shield) * 100;
- self.velocity_z = 1; // Nudge upwards to takeoff sequense can work.
- self.tur_head.exteriormodeltoclient = self.owner;
-
- self.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
- self.lip = time;
-
- if(self.owner.flagcarried)
- setorigin(self.owner.flagcarried, '-20 0 96');
-
- CSQCVehicleSetup(self.owner, 0);
- }
- METHOD(Raptor, vr_death, void(Raptor thisveh))
- {
- self.health = 0;
- self.event_damage = func_null;
- self.solid = SOLID_CORPSE;
- self.takedamage = DAMAGE_NO;
- self.deadflag = DEAD_DYING;
- self.movetype = MOVETYPE_BOUNCE;
- self.think = raptor_diethink;
- self.nextthink = time;
- self.wait = time + 5 + (random() * 5);
-
- Send_Effect(EFFECT_EXPLOSION_MEDIUM, findbetterlocation (self.origin, 16), '0 0 0', 1);
-
- self.velocity_z += 600;
-
- self.avelocity = '0 0.5 1' * (random() * 400);
- self.avelocity -= '0 0.5 1' * (random() * 400);
-
- self.colormod = '-0.5 -0.5 -0.5';
- self.touch = raptor_blowup;
- }
- METHOD(Raptor, vr_spawn, void(Raptor thisveh))
- {
- if(!self.gun1)
- {
- entity spinner;
- vector ofs;
-
- //FIXME: Camera is in a bad place in HUD model.
- //setorigin(self.vehicle_viewport, '25 0 5');
-
- self.vehicles_impulse = raptor_impulse;
-
- self.frame = 0;
-
- self.bomb1 = new(raptor_bomb);
- self.bomb2 = new(raptor_bomb);
- self.gun1 = new(raptor_gun);
- self.gun2 = new(raptor_gun);
-
- setmodel(self.bomb1, MDL_VEH_RAPTOR_CB_FOLDED);
- setmodel(self.bomb2, MDL_VEH_RAPTOR_CB_FOLDED);
- setmodel(self.gun1, MDL_VEH_RAPTOR_GUN);
- setmodel(self.gun2, MDL_VEH_RAPTOR_GUN);
- setmodel(self.tur_head, MDL_VEH_RAPTOR_TAIL);
-
- setattachment(self.bomb1, self, "bombmount_left");
- setattachment(self.bomb2, self, "bombmount_right");
- setattachment(self.tur_head, self,"root");
-
- // FIXMODEL Guns mounts to angled bones
- self.bomb1.angles = self.angles;
- self.angles = '0 0 0';
- // This messes up gun-aim, so work arround it.
- //setattachment(self.gun1, self, "gunmount_left");
- ofs = gettaginfo(self, gettagindex(self, "gunmount_left"));
- ofs -= self.origin;
- setattachment(self.gun1, self, "");
- setorigin(self.gun1, ofs);
-
- //setattachment(self.gun2, self, "gunmount_right");
- ofs = gettaginfo(self, gettagindex(self, "gunmount_right"));
- ofs -= self.origin;
- setattachment(self.gun2, self, "");
- setorigin(self.gun2, ofs);
-
- self.angles = self.bomb1.angles;
- self.bomb1.angles = '0 0 0';
-
- spinner = new(raptor_spinner);
- spinner.owner = self;
- setmodel(spinner, MDL_VEH_RAPTOR_PROP);
- setattachment(spinner, self, "engine_left");
- spinner.movetype = MOVETYPE_NOCLIP;
- spinner.avelocity = '0 90 0';
- self.bomb1.gun1 = spinner;
-
- spinner = new(raptor_spinner);
- spinner.owner = self;
- setmodel(spinner, MDL_VEH_RAPTOR_PROP);
- setattachment(spinner, self, "engine_right");
- spinner.movetype = MOVETYPE_NOCLIP;
- spinner.avelocity = '0 -90 0';
- self.bomb1.gun2 = spinner;
-
- // Sigh.
- self.bomb1.think = raptor_rotor_anglefix;
- self.bomb1.nextthink = time;
-
- self.mass = 1 ;
- }
+METHOD(Raptor, vr_impact, void(Raptor thisveh, entity instance))
+{
+ if(autocvar_g_vehicle_raptor_bouncepain)
+ vehicles_impact(instance, autocvar_g_vehicle_raptor_bouncepain_x, autocvar_g_vehicle_raptor_bouncepain_y, autocvar_g_vehicle_raptor_bouncepain_z);
+}
+METHOD(Raptor, vr_enter, void(Raptor thisveh, entity instance))
+{
+ instance.vehicle_weapon2mode = RSM_BOMB;
+ instance.owner.PlayerPhysplug = raptor_takeoff;
+ instance.movetype = MOVETYPE_BOUNCEMISSILE;
+ instance.solid = SOLID_SLIDEBOX;
+ instance.owner.vehicle_health = (instance.vehicle_health / autocvar_g_vehicle_raptor_health) * 100;
+ instance.owner.vehicle_shield = (instance.vehicle_shield / autocvar_g_vehicle_raptor_shield) * 100;
+ instance.velocity = '0 0 1'; // nudge upwards so takeoff sequence can work
+ instance.tur_head.exteriormodeltoclient = instance.owner;
+
+ instance.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
+ instance.lip = time;
+
+ if(instance.owner.flagcarried)
+ setorigin(instance.owner.flagcarried, '-20 0 96');
+
+ CSQCVehicleSetup(instance.owner, 0);
+}
+METHOD(Raptor, vr_death, void(Raptor thisveh, entity instance))
+{
+ instance.health = 0;
+ instance.event_damage = func_null;
+ instance.solid = SOLID_CORPSE;
+ instance.takedamage = DAMAGE_NO;
+ instance.deadflag = DEAD_DYING;
+ instance.movetype = MOVETYPE_BOUNCE;
+ setthink(instance, raptor_diethink);
+ instance.nextthink = time;
+ instance.wait = time + 5 + (random() * 5);