-#define hud_bg "gfx/vehicles/frame.tga"
-#define hud_sh "gfx/vehicles/vh-shield.tga"
+const string hud_bg = "gfx/vehicles/frame.tga";
+const string hud_sh = "gfx/vehicles/vh-shield.tga";
-#define hud_hp_bar "gfx/vehicles/bar_up_left.tga"
-#define hud_hp_ico "gfx/vehicles/health.tga"
-#define hud_sh_bar "gfx/vehicles/bar_dwn_left.tga"
-#define hud_sh_ico "gfx/vehicles/shield.tga"
+const string hud_hp_bar = "gfx/vehicles/bar_up_left.tga";
+const string hud_hp_ico = "gfx/vehicles/health.tga";
+const string hud_sh_bar = "gfx/vehicles/bar_dwn_left.tga";
+const string hud_sh_ico = "gfx/vehicles/shield.tga";
-#define hud_ammo1_bar "gfx/vehicles/bar_up_right.tga"
-#define hud_ammo1_ico "gfx/vehicles/bullets.tga"
-#define hud_ammo2_bar "gfx/vehicles/bar_dwn_right.tga"
-#define hud_ammo2_ico "gfx/vehicles/rocket.tga"
-#define hud_energy "gfx/vehicles/energy.tga"
+const string hud_ammo1_bar = "gfx/vehicles/bar_up_right.tga";
+const string hud_ammo1_ico = "gfx/vehicles/bullets.tga";
+const string hud_ammo2_bar = "gfx/vehicles/bar_dwn_right.tga";
+const string hud_ammo2_ico = "gfx/vehicles/rocket.tga";
+const string hud_energy = "gfx/vehicles/energy.tga";
entity dropmark;
float autocvar_cl_vehicles_hudscale = 0.5;
float autocvar_cl_vehicles_hudalpha = 0.75;
-const float MAX_AXH = 4;
+const int MAX_AXH = 4;
entity AuxiliaryXhair[MAX_AXH];
.string axh_image;
.float axh_fadetime;
-.float axh_drawflag;
+.int axh_drawflag;
.float axh_scale;
float alarm1time;
float alarm2time;
-void vehicle_alarm(entity e, float ch, string s0und)
+void vehicle_alarm(entity e, int ch, string s0und)
{
if(!autocvar_cl_vehicles_alarm)
return;
void Net_VehicleSetup()
{
- float i;
-
- float hud_id = ReadByte();
+ int i;
+ int hud_id = ReadByte();
// hud_id == 0 means we exited a vehicle, so stop alarm sound/s
if(hud_id == 0)
return true;
}
-void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, float axh_id)
+void UpdateAuxiliaryXhair(entity own, vector loc, vector clr, int axh_id)
{
if(!IS_REAL_CLIENT(own))
return;
own.(AuxiliaryXhair[axh_id]) = axh;
}
-void CSQCVehicleSetup(entity own, float vehicle_id)
+void CSQCVehicleSetup(entity own, int vehicle_id)
{
if(!IS_REAL_CLIENT(own))
return;
vector targetdrone_getnewspot()
{
vector spot;
- float i;
+ int i;
for(i = 0; i < 100; ++i)
{
spot = self.origin + randomvec() * 1024;
}
// projectile handling
-void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void vehicles_projectile_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
// Ignore damage from oterh projectiles from my owner (dont mess up volly's)
if(inflictor.owner == self.owner)
entity vehicles_projectile(string _mzlfx, string _mzlsound,
vector _org, vector _vel,
float _dmg, float _radi, float _force, float _size,
- float _deahtype, float _projtype, float _health,
- float _cull, float _clianim, entity _owner)
+ int _deahtype, float _projtype, float _health,
+ bool _cull, bool _clianim, entity _owner)
{
entity proj;
self.nextthink = time + 0.1;
}
-entity vehicle_tossgib(entity _template, vector _vel, string _tag, float _burn, float _explode, float _maxtime, vector _rot)
+entity vehicle_tossgib(entity _template, vector _vel, string _tag, bool _burn, bool _explode, float _maxtime, vector _rot)
{
entity _gib = spawn();
setmodel(_gib, _template.model);
return _gib;
}
-float vehicle_addplayerslot( entity _owner,
+bool vehicle_addplayerslot( entity _owner,
entity _slot,
- float _hud,
+ int _hud,
string _hud_model,
- float() _framefunc,
- void(float) _exitfunc, float() _enterfunc)
+ bool() _framefunc,
+ void(bool) _exitfunc, float() _enterfunc)
{
if(!(_owner.vehicle_flags & VHF_MULTISLOT))
_owner.vehicle_flags |= VHF_MULTISLOT;
}
}
-void vehicles_damage(entity inflictor, entity attacker, float damage, float deathtype, vector hitloc, vector force)
+void vehicles_damage(entity inflictor, entity attacker, float damage, int deathtype, vector hitloc, vector force)
{
self.dmg_time = time;
return self.origin;
}
-void vehicles_exit(float eject)
+void vehicles_exit(bool eject)
{
entity _vehicle;
entity _player;
if(autocvar_g_vehicles_steal_show_waypoint)
WaypointSprite_Spawn("intruder", 0, 0, pl, '0 0 68', world, veh.team, veh, wps_intruder, true, RADARICON_DANGER, Team_ColorRGB(pl.team));
}
- else { return; }
+ else return;
RemoveGrapplingHook(pl);
CSQCMODEL_AUTOINIT();
}
-float vehicle_initialize(float vehicle_id, float nodrop)
+bool vehicle_initialize(int vehicle_id, bool nodrop)
{
if(!autocvar_g_vehicles)
return false;