-#ifdef REGISTER_VEHICLE
-REGISTER_VEHICLE(
+#ifndef VEHICLE_RAPTOR
+#define VEHICLE_RAPTOR
+#include "raptor.qh"
+#ifndef MENUQC
+int v_raptor(int);
+#endif
+REGISTER_VEHICLE_SIMPLE(
/* VEH_##id */ RAPTOR,
-/* function */ v_raptor,
/* spawnflags */ VHF_DMGSHAKE | VHF_DMGROLL,
/* mins,maxs */ '-80 -80 0', '80 80 70',
/* model */ "models/vehicles/raptor.dpm",
/* tags */ "", "tag_hud", "tag_camera",
/* netname */ "raptor",
/* fullname */ _("Raptor")
-);
-#else
+) {
+ this.m_icon = "vehicle_raptor";
+#ifndef MENUQC
+ this.vehicle_func = v_raptor;
+#endif
+}
+#endif
+
+#ifdef IMPLEMENTATION
#ifdef SVQC
bool autocvar_g_vehicle_raptor;
}
self.nextthink = time;
-
+
CSQCMODEL_AUTOUPDATE();
}
player = self;
raptor = self.vehicle;
self = raptor;
-
+
vehicles_painframe();
/*
ftmp = vlen(self.velocity);
player = self;
raptor = self.vehicle;
self = raptor;
-
+
self.nextthink = time;
CSQCMODEL_AUTOUPDATE();
self.nextthink = 0; // will this work?
-
+
if(self.sound_nexttime < time)
{
self.sound_nexttime = time + 7.955812; //soundlength("vehicles/raptor_fly.wav");
Send_Effect("explosion_small", randomvec() * 80 + (self.origin + '0 0 100'), '0 0 0', 1);
}
self.nextthink = time;
-
+
CSQCMODEL_AUTOUPDATE();
}
{
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);
-
+
return true;
}
case VR_ENTER:
self.movetype = MOVETYPE_TOSS;
self.solid = SOLID_SLIDEBOX;
self.vehicle_energy = 1;
-
+
self.PlayerPhysplug = raptor_frame;
self.bomb1.gun1.avelocity_y = 90;
self.bomb1.gun2.avelocity_y = -90;
-
+
self.delay = time;
self.bouncefactor = autocvar_g_vehicle_raptor_bouncefactor;
if(autocvar_g_vehicle_raptor_energy_regen)
self.vehicle_flags |= VHF_ENERGYREGEN;
-
+
self.vehicle_exit = raptor_exit;
self.respawntime = autocvar_g_vehicle_raptor_respawntime;
self.vehicle_health = autocvar_g_vehicle_raptor_health;
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
self.max_health = self.vehicle_health;
-
+
return true;
}
case VR_PRECACHE:
precache_sound ("vehicles/raptor_fly.wav");
precache_sound ("vehicles/raptor_speed.wav");
precache_sound ("vehicles/missile_alarm.wav");
-
+
return true;
}
}
case RSM_BOMB: crosshair = vCROSS_BURST; break;
default: crosshair = vCROSS_BURST;
}
-
- Vehicles_drawHUD("vehicle_raptor", "vehicle_raptor_weapon1", "vehicle_raptor_weapon2",
+
+ Vehicles_drawHUD(VEH_RAPTOR.m_icon, "vehicle_raptor_weapon1", "vehicle_raptor_weapon2",
"vehicle_icon_ammo1", autocvar_hud_progressbar_vehicles_ammo1_color,
"vehicle_icon_ammo2", autocvar_hud_progressbar_vehicles_ammo2_color,
crosshair);