// Fetch health & ammo stats
HUD_GETSTATS
-
+
hudloc_y = 4;
hudloc_x = 4;
-
+
picsize = drawgetimagesize(spider_h) * 0.5;
drawpic(hudloc, spider_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
picsize = drawgetimagesize(spider_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
- ammo1 /= 100;
+
+ ammo1 /= 100;
shield /= 100;
health /= 100;
reload2 /= 100;
-
+
drawpic(hudloc, spider_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
drawpic(hudloc, spider_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, spider_r, picsize, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
// Fetch health & ammo stats
HUD_GETSTATS
-
+
hudloc_y = 4;
hudloc_x = 4;
-
+
picsize = drawgetimagesize(spider_h) * 0.5;
drawpic(hudloc, spider_h, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
picsize = drawgetimagesize(spider_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
- ammo1 /= 100;
+
+ ammo1 /= 100;
shield /= 100;
health /= 100;
reload2 /= 100;
-
+
drawpic(hudloc, spider_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
drawpic(hudloc, spider_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, spider_r, picsize, '1 1 1' * reload2 + '1 0 0' * (1 - reload2), 1, DRAWFLAG_NORMAL);
{
if(autocvar_r_letterbox)
return;
-
- vector picsize, hudloc, vel;
- float movedt;
+
+ vector picsize, hudloc;
vector where;
// Fetch health & ammo stats
HUD_GETSTATS
-
+
// Draw the crosshairs
picsize = drawgetimagesize("gfx/vehicles/axh-cross.tga");
picsize_x *= 0.75;
energy = min(getstatf(STAT_VEHICLESTAT_ENERGY), 1);
rockets = bound(0,getstatf(STAT_VEHICLESTAT_RELOAD1), 1);
*/
-
+
HUD_GETSTATS
-
+
hudloc_y = 4;
hudloc_x = 4;
picsize = drawgetimagesize(waki_b) * 0.5;
hudloc_y = 10.5;
hudloc_x = 10.5;
-
+
health /= 100;
energy /= 100;
shield /= 100;
reload1 /= 100;
-
+
drawpic(hudloc, waki_s, picsize, '1 1 1', shield, DRAWFLAG_NORMAL);
drawpic(hudloc, waki_b, picsize, '0 1 0' * health + '1 0 0' * (1 - health), 1, DRAWFLAG_NORMAL);
drawpic(hudloc, waki_r, picsize, '1 1 1' * reload1 + '1 0 0' * (1 - reload1), 1, DRAWFLAG_NORMAL);
precache_model("models/vehicles/rocket02.md3");
}
-
void RaptorCBShellfragDraw()
{
Movetype_Physics_MatchTicrate(autocvar_cl_gibs_ticrate, autocvar_cl_gibs_sloppy);
remove(self);
}
+
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang)
{
entity sfrag;
sfrag.nextthink = time + 3;
sfrag.cnt = time + 2;
sfrag.drawmask = MASK_NORMAL;
-
-
}
void RaptorCBShellfragDraw();
void RaptorCBShellfragToss(vector _org, vector _vel, vector _ang);
-void Vehicles_Precache();
\ No newline at end of file
+void Vehicles_Precache();
+
+#ifdef SVQC
// Auto cvars
float autocvar_g_vehicle_bumblebee_speed_forward;
float autocvar_g_vehicle_bumblebee_speed_strafe;
entity vehic, gun, gunner;
float ftmp, ftmp2;
vector vtmp;
-
+
vehic = self.vehicle;
gun = self.vehicle.gun1;
gunner = self;
-
+
self = vehic;
- vehic.solid = SOLID_NOT;
+ vehic.solid = SOLID_NOT;
crosshair_trace(gunner);
-
+
//vtmp = gettaginfo(vehic, gettagindexvehic, "tag_hardpoint01"));
vtmp = gettaginfo(gun, gettagindex(gun, "muzzle"));
vtmp = vectoangles(normalize(trace_endpos - vtmp)); // Find the direction & angle
vtmp = shortangle_vxy(vtmp - (vehic.angles + gun.angles), vehic.angles + gun.angles); // Find aim offset
-
+
// Bind to aimspeed
ftmp2 = autocvar_g_vehicle_bumblebee_cannon_turnspeed * frametime; ftmp = -ftmp2;
vtmp_x = bound(ftmp, vtmp_x, ftmp2);
vtmp_y = bound(ftmp, vtmp_y, ftmp2);
// Bind to limts
gun.angles_x = bound(-autocvar_g_vehicle_bumblebee_cannon_pitchlimit_down, vtmp_x + gun.angles_x, autocvar_g_vehicle_bumblebee_cannon_pitchlimit_up);
- gun.angles_y = bound(-autocvar_g_vehicle_bumblebee_cannon_turnlimit_in, vtmp_y + gun.angles_y, autocvar_g_vehicle_bumblebee_cannon_turnlimit_out);
+ gun.angles_y = bound(-autocvar_g_vehicle_bumblebee_cannon_turnlimit_in, vtmp_y + gun.angles_y, autocvar_g_vehicle_bumblebee_cannon_turnlimit_out);
if(gunner.BUTTON_ATCK && gun.cnt <= time)
{
fireBullet (vtmp, v_forward, autocvar_g_vehicle_spiderbot_minigun_spread, autocvar_g_vehicle_spiderbot_minigun_damage,
autocvar_g_vehicle_spiderbot_minigun_spread, DEATH_SBMINIGUN, 0);
-
+
gun.cnt = time + 0.1;
}
-
+
setorigin(gunner, vehic.origin);
gunner.velocity = vehic.velocity;
-
- vehic.solid = SOLID_BBOX;
+
+ vehic.solid = SOLID_BBOX;
gunner.BUTTON_ATCK = gunner.BUTTON_ATCK2 = gunner.BUTTON_CROUCH = 0;
self = gunner;
return 1;
{
if(self.gunner1 != world)
return;
-
+
self.gunner1 = other;
self.gunner1.vehicle = self;
{
entity pilot, gunner, vehic;
vector newvel;
-
+
pilot = self;
vehic = self.vehicle;
self = vehic;
}
crosshair_trace(pilot);
-
+
vector vang;
float ftmp;
-
+
vang = vehic.angles;
newvel = vectoangles(normalize(trace_endpos - self.origin + '0 0 32'));
vang_x *= -1;
newvel -= v_right * autocvar_g_vehicle_bumblebee_speed_strafe;
else if(pilot.movement_y > 0)
newvel += v_right * autocvar_g_vehicle_bumblebee_speed_strafe;
- ftmp = newvel * v_right;
+ ftmp = newvel * v_right;
ftmp *= frametime * 0.1;
vehic.angles_z = bound(-15, vehic.angles_z + ftmp, 15);
}
pilot.BUTTON_ATCK = pilot.BUTTON_ATCK2 = pilot.BUTTON_CROUCH = 0;
self = pilot;
-
+
return 1;
}
}
void bumb_spawn()
-{
+{
self.vehicle_health = autocvar_g_vehicle_bumblebee_health;
self.vehicle_shield = autocvar_g_vehicle_bumblebee_shield;
self.movetype = MOVETYPE_TOSS;
self.gun1 = spawn();
setmodel(self.gun1, "models/vehicles/bumblebee_ray.dpm");
setattachment(self.gun1, self, "tag_hardpoint03");
-
+
self.gun1 = spawn();
self.gun2 = spawn();
-
+
self.gun1.owner = self;
self.gun2.owner = self;
-
+
setmodel(self.gun1, "models/vehicles/bumblebee_plasma_right.dpm");
setmodel(self.gun2, "models/vehicles/bumblebee_plasma_left.dpm");
-
+
setattachment(self.gun1, self, "tag_hardpoint01");
setattachment(self.gun2, self, "tag_hardpoint02");
ofs -= self.origin;
setattachment(self.gun1, self, "");
setorigin(self.gun1, ofs);
-
+
ofs = gettaginfo(self, gettagindex(self, "tag_hardpoint02"));
ofs -= self.origin;
setattachment(self.gun2, self, "");
precache_model ("models/vehicles/bumblebee_ray.dpm");
//vehicles_configcheck("vehicle_bumblebee.cfg", autocvar_g_vehicle_bumblebee_health);
-
+
if(autocvar_g_vehicle_bumblebee_energy)
if(autocvar_g_vehicle_bumblebee_energy_regen)
self.vehicle_flags |= VHF_ENERGYREGEN;
self.vehicle_flags |= VHF_HEALTHREGEN;
self.think = bumb_dinit;
- self.nextthink = time + 1;
-}
\ No newline at end of file
+ self.nextthink = time + 1;
+}
+#endif // SVQC
+
+#ifdef CSQC
+void bumblebee_draw()
+{
+
+}
+
+void bumblebee_draw2d()
+{
+
+}
+
+void bumblebee_read_extra()
+{
+
+}
+
+void vehicle_bumblebee_assemble()
+{
+
+}
+#endif //CSQC
float VSF_MOVEMENT = 4; /// Send movement update (and angles)
float VSF_AVEL = 8; /// Send Angular velocity
float VSF_STATS = 16; /// Send ammo, health etc
-float VSF_EXTRA = 32; /// Send additional data (turret rotations and such). Handeld per vehicle type.
+float VSF_EXTRA = 32; /// Send additional data (turret rotations etc). Handeld per vehicle type.
float VSF_ANIMINFO = 64; /// Animation info
float VSF_FAR = 128;
float VSF_FULL_UPDATE = 16777215; /// Send everything
{
float dist;
var void WriteFunc(float, float);
-
+
dist = vlen(self.origin - to.origin);
if(dist > VSF_FARDISTANCE && to != self.owner)
sf |= VSF_FAR;
-
+
// Always send a movement and origin to owner
if(to == self.owner)
sf |= VSF_ORIGIN | VSF_MOVEMENT;
-
+
WriteByte(MSG_ENTITY, ENT_CLIENT_VEHICLE);
-
+
// We need to know client-side what was sent
WriteByte(MSG_ENTITY, sf);
-
+
if(sf & VSF_SETUP)
{
- WriteByte(MSG_ENTITY, self.hud); //vehicle type = hud
- WriteByte(MSG_ENTITY, self.team);
- WriteShort(MSG_ENTITY, self.colormap);
+ WriteByte(MSG_ENTITY, self.hud); //vehicle type = hud
+ WriteByte(MSG_ENTITY, self.team);
+ WriteShort(MSG_ENTITY, self.colormap);
+ WriteShort(MSG_ENTITY, self.vehicle_flags);
}
-
+
if(sf & VSF_ORIGIN)
- {
- WriteFunc = ((sf & VSF_FAR) ? WriteShort : WriteCoord);
+ {
+ WriteFunc = ((sf & VSF_FAR) ? WriteShort : WriteCoord);
WriteFunc(MSG_ENTITY, self.origin_x);
WriteFunc(MSG_ENTITY, self.origin_y);
- WriteFunc(MSG_ENTITY, self.origin_z);
+ WriteFunc(MSG_ENTITY, self.origin_z);
}
-
+
if(sf & VSF_MOVEMENT)
- {
+ {
WriteFunc = ((sf & VSF_FAR) ? WriteShort : WriteCoord);
- WriteCoord(MSG_ENTITY, self.velocity_x);
- WriteCoord(MSG_ENTITY, self.velocity_y);
- WriteCoord(MSG_ENTITY, self.velocity_z);
+ WriteFunc(MSG_ENTITY, self.velocity_x);
+ WriteFunc(MSG_ENTITY, self.velocity_y);
+ WriteFunc(MSG_ENTITY, self.velocity_z);
WriteFunc = ((sf & VSF_FAR) ? WriteShort : WriteAngle);
- WriteAngle(MSG_ENTITY, self.angles_x);
- WriteAngle(MSG_ENTITY, self.angles_y);
- WriteAngle(MSG_ENTITY, self.angles_z);
+ WriteFunc(MSG_ENTITY, self.angles_x);
+ WriteFunc(MSG_ENTITY, self.angles_y);
+ WriteFunc(MSG_ENTITY, self.angles_z);
}
-
+
if(sf & VSF_AVEL)
{
WriteFunc = ((sf & VSF_FAR) ? WriteShort : WriteCoord);
- WriteCoord(MSG_ENTITY, self.avelocity_x);
- WriteCoord(MSG_ENTITY, self.avelocity_y);
- WriteCoord(MSG_ENTITY, self.avelocity_z);
+ WriteFunc(MSG_ENTITY, self.avelocity_x);
+ WriteFunc(MSG_ENTITY, self.avelocity_y);
+ WriteFunc(MSG_ENTITY, self.avelocity_z);
}
-
+
if(sf & VSF_STATS)
{
if(to == self.owner)
WriteByte(MSG_ENTITY, 1);
WriteByte(MSG_ENTITY, self.vehicle_shield);
WriteByte(MSG_ENTITY, self.vehicle_energy);
-
+
WriteByte(MSG_ENTITY, self.vehicle_ammo1);
WriteByte(MSG_ENTITY, self.vehicle_reload1);
-
+
WriteByte(MSG_ENTITY, self.vehicle_ammo2);
WriteByte(MSG_ENTITY, self.vehicle_reload2);
-
+
}
else
WriteByte(MSG_ENTITY, 0);
-
+
WriteByte(MSG_ENTITY, self.vehicle_health);
}
-
+
if(sf & VSF_EXTRA)
self.vehile_send_exta(to, sf);
-
+
return TRUE;
}
void net_link_vehile()
-{
+{
self.SendFlags = 0xFFFFFF;
- Net_LinkEntity(self, FALSE, 0, send_vehile);
+ Net_LinkEntity(self, FALSE, 0, send_vehile);
}
#endif // SVQC
#ifdef CSQC
+void vehicle_spiderbot_assemble()
+{
+
+}
+
+void vehicle_racer_assemble()
+{
+
+}
+
+void vehicle_raptor_assemble()
+{
+
+}
+
+void vehicle_bumblebee_assemble()
+{
+
+}
+
void Net_ReadVehicle(float bIsNew)
{
float sf;
var float ReadFunc();
-
+
if(bIsNew)
{
/*setmodel(self, "models/vehicles/wakizashi.dpm");
- self.move_movetype = MOVETYPE_BOUNCE;
+ self.move_movetype = MOVETYPE_BOUNCE;
self.entremove = VehicleRacerRemove;
- setsize(self, '-60 -60 -20', '60 60 20');
+ setsize(self, '-60 -60 -20', '60 60 20');
self.draw = VehicleRacerDraw;
self.scale = 0.5;*/
}
- sf = ReadByte();
+ sf = ReadByte();
if(sf & VSF_SETUP)
{
- self.vehicle_hud = ReadByte();
- self.team = ReadByte();
- self.colormap = ReadShort();
-
+ self.vehicle_hud = ReadByte();
+ self.team = ReadByte();
+ self.colormap = ReadShort();
+ self.vehicle_flags = ReadShort();
+
switch(self.vehicle_hud)
{
case HUD_WAKIZASHI:
+ vehicle_racer_assemble();
break;
case HUD_SPIDERBOT:
+ vehicle_spiderbot_assemble();
break;
case HUD_RAPTOR:
+ vehicle_raptor_assemble();
break;
case HUD_BUMBLEBEE:
+ vehicle_bumblebee_assemble();
break;
default:
break;
}
- }
-
+ }
+
if(sf & VSF_ORIGIN)
- {
+ {
ReadFunc = ((sf & VSF_FAR) ? ReadShort : ReadCoord);
self.origin_x = ReadCoord();
self.origin_y = ReadCoord();
self.origin_z = ReadCoord();
self.move_origin = self.origin;
}
-
+
if(sf & VSF_MOVEMENT)
- {
+ {
ReadFunc = ((sf & VSF_FAR) ? ReadShort : ReadCoord);
self.velocity_x = ReadFunc();
self.velocity_y = ReadFunc();
self.angles_x = ReadFunc();
self.angles_y = ReadFunc();
self.angles_z = ReadFunc();
-
+
self.move_velocity = self.velocity;
self.move_angles = self.angles;
}
if(sf & VSF_AVEL)
- {
+ {
ReadFunc = ((sf & VSF_FAR) ? ReadShort : ReadCoord);
self.avelocity_x = ReadFunc();
self.avelocity_y = ReadFunc();
self.avelocity_z = ReadFunc();
}
-
+
+ if(sf & VSF_STATS)
+ {
+ if(ReadByte() == 1)
+ {
+ self.vehicle_shield = ReadByte();
+ self.vehicle_energy = ReadByte();
+ self.vehicle_ammo1 = ReadByte();
+ self.vehicle_reload1 = ReadByte();
+ self.vehicle_ammo2 = ReadByte();
+ self.vehicle_reload2 = ReadByte();
+ }
+ self.vehicle_health = ReadByte();
+ }
+
if(sf & VSF_EXTRA)
self.vehile_read_exta(sf);
ftmp = racer.velocity_z;
df = racer.velocity * -autocvar_g_vehicle_racer_friction;
racer.velocity_z = ftmp;
-
+
if(player.movement_x != 0)
{
if(player.movement_x > 0)
else if(player.movement_y > 0)
df += v_right * autocvar_g_vehicle_racer_speed_strafe;
}
-
+
// Afterburn
if (player.BUTTON_JUMP)
if(racer.vehicle_energy >= (autocvar_g_vehicle_racer_afterburn_cost * frametime))
#ifdef VEHICLES_CSQC
void racer_send_exta(entity to)
{
-
+
}
#endif
racer_spawn, autocvar_g_vehicle_racer_respawntime,
racer_frame,
racer_enter, racer_exit,
- racer_die, racer_think,
+ racer_die, racer_think,
FALSE))
{
remove(self);
#endif // SVQC
#ifdef CSQC
+void racer_draw()
+{
+
+}
+
+void racer_draw2d()
+{
+
+}
+
void racer_read_extra()
{
-
+
+}
+
+void vehicle_racer_assemble()
+{
+
}
-#endif //CSQC
\ No newline at end of file
+#endif //CSQC
+#fdef SVQC
#define RAPTOR_MIN '-80 -80 0'
#define RAPTOR_MAX '80 80 70'
{
if(self.cnt > time)
if(autocvar_g_vehicle_raptor_bomblet_alt)
- {
+ {
self.nextthink = time;
traceline(self.origin, self.origin + (normalize(self.velocity) * autocvar_g_vehicle_raptor_bomblet_alt), MOVE_NORMAL, self);
if((trace_fraction == 1.0) || (vlen(self.origin - self.owner.origin) < autocvar_g_vehicle_raptor_bomblet_radius))
//sound (self, CHAN_PROJECTILE, "weapons/rocket_impact.wav", VOL_BASE, ATTN_NORM);
//pointparticles(particleeffectnum("raptor_bomb_spread"), self.origin, self.velocity, 1);
-
+
Damage_DamageInfo(self.origin, 0, 0, 0, '0 0 0', DEATH_RAPTOR_BOMB_SPLIT, self);
-
+
for(i = 0; i < autocvar_g_vehicle_raptor_bomblets; ++i)
{
bomblet = spawn();
bomblet.owner = self.owner;
bomblet.realowner = self.realowner;
bomblet.velocity = normalize(normalize(self.velocity) + (randomvec() * autocvar_g_vehicle_raptor_bomblet_spread)) * vlen(self.velocity);
-
+
PROJECTILE_MAKETRIGGER(bomblet);
CSQCProjectile(bomblet, TRUE, PROJECTILE_RAPTORBOMBLET, TRUE);
}
void raptor_fire_cannon(entity gun, string tagname)
{
entity bolt;
- vector b_org;
+ vector b_org;
b_org = gettaginfo(gun, gettagindex(gun, tagname));
bolt = vehicles_projectile("raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
b_org, normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
void raptor_exit(float eject)
{
self.tur_head.exteriormodeltoclient = world;
-
+
if(self.deadflag == DEAD_NO)
{
self.think = raptor_land;
raptor.delay = time + autocvar_g_vehicle_raptor_bombs_refire;
raptor.lip = time;
}
-
+
raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip);
player.vehicle_reload2 = bound(0, raptor.bomb1.alpha * 100, 100);
raptor_spawn, autocvar_g_vehicle_raptor_respawntime,
raptor_frame,
raptor_enter, raptor_exit,
- raptor_die, raptor_think,
+ raptor_die, raptor_think,
FALSE))
{
remove(self);
self.bomb2 = spawn();
self.gun1 = spawn();
self.gun2 = spawn();
-
+
#ifdef RAPTOR_RETARDCAMERA
setattachment(self.vehicle_viewport, world, "");
#endif
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 ;
}
self.think = raptor_dinit;
self.nextthink = time + 1;
}
+#endif // SVQC
+
+#ifdef CSQC
+void raptor_draw()
+{
+
+}
+
+void raptor_draw2d()
+{
+
+}
+
+void raptor_read_extra()
+{
+
+}
+
+void vehicle_raptor_assemble()
+{
+
+}
+#endif //CSQC
const vector SPIDERBOT_MIN = '-75 -75 10';
const vector SPIDERBOT_MAX = '75 75 125';
+#ifdef SVQC
float autocvar_g_vehicle_spiderbot_respawntime;
float autocvar_g_vehicle_spiderbot_speed_stop;
self.angles_x = bound(-45, self.angles_x, 45);
self.angles_z = bound(-45, self.angles_z, 45);
-
+
if(player.BUTTON_ATCK)
{
spider.cnt = time;
entity gun;
vector v;
spider.misc_bulletcounter += 1;
-
+
self = player;
-
+
mod(spider.misc_bulletcounter, 2) ? gun = spider.gun1 : gun = spider.gun2;
v = gettaginfo(gun, gettagindex(gun, "barrels"));
v_forward = normalize(v_forward);
sound (gun, CHAN_WEAPON, "weapons/uzi_fire.wav", VOL_BASE, ATTN_NORM);
trailparticles(self, particleeffectnum("spiderbot_minigun_trail"), v, trace_endpos);
pointparticles(particleeffectnum("spiderbot_minigun_muzzleflash"), v, v_forward * 2500, 1);
-
+
self = spider;
-
+
spider.vehicle_ammo1 -= autocvar_g_vehicle_spiderbot_minigun_ammo_cost;
spider.tur_head.attack_finished_single = time + autocvar_g_vehicle_spiderbot_minigun_refire;
player.vehicle_ammo1 = (spider.vehicle_ammo1 / autocvar_g_vehicle_spiderbot_minigun_ammo_max) * 100;
vehicles_regen(cnt, vehicle_ammo1, autocvar_g_vehicle_spiderbot_minigun_ammo_max,
autocvar_g_vehicle_spiderbot_minigun_ammo_regen_pause,
autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime);
-
+
spiderbot_rocket_do();
if(self.vehicle_flags & VHF_SHIELDREGEN)
spiderbot_spawn, autocvar_g_vehicle_spiderbot_respawntime,
spiderbot_frame,
spiderbot_enter, spiderbot_exit,
- spiderbot_die, spiderbot_think,
+ spiderbot_die, spiderbot_think,
FALSE))
{
remove(self);
self.think = vewhicle_spiderbot_dinit;
self.nextthink = time + 0.5;
}
+#endif // SVQC
+
+#ifdef CSQC
+void spiderbot_draw()
+{
+
+}
+
+void spiderbot_draw2d()
+{
+
+}
+
+void spiderbot_read_extra()
+{
+
+}
+
+void vehicle_spiderbot_assemble()
+{
+
+}
+#endif //CSQC
-// #define VEHICLES_CSQC
+#define VEHICLES_CSQC
// #define VEHICLES_USE_ODE
#define VEHICLES_ENABLED
#ifdef VEHICLES_ENABLED
float VHF_ENERGYREGEN = 32; /// Vehicles energy regenerates
float VHF_DEATHEJECT = 64; /// Vehicle ejects pilot upon fatal damage
float VHF_MOVE_GROUND = 128; /// Vehicle moves on gound
-float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
+float VHF_MOVE_HOVER = 256; /// Vehicle hover close to gound
float VHF_MOVE_FLY = 512; /// Vehicle is airborn
.entity gun1;
.entity gun2;
-.float vehicle_health; /// If self is player this is 0..1 indicating precentage of health left on vehicle. If self is vehile, this is the real health value.
-.float vehicle_energy; /// If self is player this is 0..1 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value.
-.float vehicle_shield; /// If self is player this is 0..1 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value.
+.float vehicle_health; /// If self is player this is 0..100 indicating precentage of health left on vehicle. If self is vehile, this is the real health value.
+.float vehicle_energy; /// If self is player this is 0..100 indicating precentage of energy left on vehicle. If self is vehile, this is the real energy value.
+.float vehicle_shield; /// If self is player this is 0..100 indicating precentage of shield left on vehicle. If self is vehile, this is the real shield value.
.entity vehicle_shieldent; /// Entity to disply the shild effect on damage
.float vehicle_ammo1; /// If self is player this field's use depends on the individual vehile. If self is vehile, this is the real ammo1 value.
var .void() vehicle_spawn; /// Vehicles custom fucntion to be efecuted when vehicle (re)spawns
#ifdef VEHICLES_CSQC
-var .void(entity to, float sflags) vehile_send_exta; /// Vehicles custom send code (for extra bits, stats and whatnot)
+var .void(entity to, float sflags) vehile_send_exta; /// Vehicles custom send func
void net_link_vehile(); /// Initiates csqc networking for vehicle
#endif //VEHICLES_CSQC
#endif //SVQC
#ifdef CSQC
#ifdef VEHICLES_CSQC
.float vehicle_hud;
-void vehicle_spiderbot_assemble() {};
-void vehicle_racer_assemble() {};
-void vehicle_raptor_assemble() {};
-void vehicle_bumblebee_assemble() {};
+void vehicle_spiderbot_assemble();
+void vehicle_racer_assemble();
+void vehicle_raptor_assemble();
+void vehicle_bumblebee_assemble();
void Net_ReadVehicle(float bIsNew);
var .void (float sf)vehile_read_exta;
#endif //VEHICLES_CSQC
void(entity e, vector force, vector force_pos) physics_addforce = #541; // apply a force from certain origin, length of force vector is power of force
void(entity e, vector torque) physics_addtorque = #542; // add relative torque
#endif // VEHICLES_USE_ODE
-#endif // VEHICLES_ENABLED
\ No newline at end of file
+#endif // VEHICLES_ENABLED