#define VEHICLES_DEF_H
#ifdef SVQC
-#include "../turrets/sv_turrets.qh"
+#include <common/turrets/sv_turrets.qh>
+#include "vehicle.qh"
// vehicle cvars
bool autocvar_g_vehicles = true;
float autocvar_g_vehicles_tag_damagerate = 5;
float autocvar_g_vehicles_weapon_damagerate = 1;
+.float vehicle_last_trace;
+
// flags:
.int vehicle_flags;
.bool(int _imp) vehicles_impulse;
.int vehicle_weapon2mode = _STAT(VEHICLESTAT_W2MODE);
.void(int exit_flags) vehicle_exit;
-.bool() vehicle_enter;
+.bool(entity this, entity player) vehicle_enter;
const int VHEF_NORMAL = 0; /// User pressed exit key
const int VHEF_EJECT = 1; /// User pressed exit key 3 times fast (not implemented) or vehile is dying
const int VHEF_RELEASE = 2; /// Release ownership, client possibly allready dissconnected / went spec / changed team / used "kill" (not implemented)
float vehicles_exit_running;
// macros
-#define VEHICLE_UPDATE_PLAYER(ply,fld,vhname) \
- ply.vehicle_##fld = (self.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100
+#define VEHICLE_UPDATE_PLAYER(ply,vehi,fld,vhname) \
+ ply.vehicle_##fld = (vehi.vehicle_##fld / autocvar_g_vehicle_##vhname##_##fld) * 100
.float vehicle_enter_delay; // prevent players jumping to and from vehicles instantly
void vehicles_exit(float eject);
-float vehicle_initialize(entity vehicle, float nodrop);
+bool vehicle_initialize(entity this, Vehicle info, float nodrop);
bool vehicle_impulse(entity this, int imp);
bool vehicles_crushable(entity e);