);
#else
#ifdef SVQC
-float autocvar_g_vehicle_racer;
+bool autocvar_g_vehicle_racer;
float autocvar_g_vehicle_racer_speed_afterburn;
float autocvar_g_vehicle_racer_afterburn_cost;
float autocvar_g_vehicle_racer_upforcedamper;
float autocvar_g_vehicle_racer_friction;
-var float autocvar_g_vehicle_racer_water_time = 5;
+float autocvar_g_vehicle_racer_water_time = 5;
float autocvar_g_vehicle_racer_hovertype;
float autocvar_g_vehicle_racer_hoverpower;
bolt = vehicles_projectile("wakizashi_gun_muzzleflash", "weapons/lasergun_fire.wav",
v, normalize(v_forward + randomvec() * autocvar_g_vehicle_racer_cannon_spread) * autocvar_g_vehicle_racer_cannon_speed,
autocvar_g_vehicle_racer_cannon_damage, autocvar_g_vehicle_racer_cannon_radius, autocvar_g_vehicle_racer_cannon_force, 0,
- DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, TRUE, TRUE, self.owner);
+ DEATH_VH_WAKI_GUN, PROJECTILE_WAKICANNON, 0, true, true, self.owner);
// Fix z-aim (for chase mode)
v = normalize(trace_endpos - bolt.origin);
entity rocket = rocket = vehicles_projectile("wakizashi_rocket_launch", "weapons/rocket_fire.wav",
v, v_forward * autocvar_g_vehicle_racer_rocket_speed,
autocvar_g_vehicle_racer_rocket_damage, autocvar_g_vehicle_racer_rocket_radius, autocvar_g_vehicle_racer_rocket_force, 3,
- DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, FALSE, FALSE, self.owner);
+ DEATH_VH_WAKI_ROCKET, PROJECTILE_WAKIROCKET, 20, false, false, self.owner);
rocket.lip = autocvar_g_vehicle_racer_rocket_accel * sys_frametime;
rocket.wait = autocvar_g_vehicle_racer_rocket_turnrate;
player.vehicle_reload1 = bound(0, 100 * ((time - racer.lip) / (racer.delay - racer.lip)), 100);
if(racer.vehicle_flags & VHF_SHIELDREGEN)
- vehicles_regen(racer.dmg_time, vehicle_shield, autocvar_g_vehicle_racer_shield, autocvar_g_vehicle_racer_shield_regen_pause, autocvar_g_vehicle_racer_shield_regen, frametime, TRUE);
+ vehicles_regen(racer.dmg_time, vehicle_shield, autocvar_g_vehicle_racer_shield, autocvar_g_vehicle_racer_shield_regen_pause, autocvar_g_vehicle_racer_shield_regen, frametime, true);
if(racer.vehicle_flags & VHF_HEALTHREGEN)
- vehicles_regen(racer.dmg_time, vehicle_health, autocvar_g_vehicle_racer_health, autocvar_g_vehicle_racer_health_regen_pause, autocvar_g_vehicle_racer_health_regen, frametime, FALSE);
+ vehicles_regen(racer.dmg_time, vehicle_health, autocvar_g_vehicle_racer_health, autocvar_g_vehicle_racer_health_regen_pause, autocvar_g_vehicle_racer_health_regen, frametime, false);
if(racer.vehicle_flags & VHF_ENERGYREGEN)
- vehicles_regen(racer.wait, vehicle_energy, autocvar_g_vehicle_racer_energy, autocvar_g_vehicle_racer_energy_regen_pause, autocvar_g_vehicle_racer_energy_regen, frametime, FALSE);
+ vehicles_regen(racer.wait, vehicle_energy, autocvar_g_vehicle_racer_energy, autocvar_g_vehicle_racer_energy_regen_pause, autocvar_g_vehicle_racer_energy_regen, frametime, false);
VEHICLE_UPDATE_PLAYER(player, health, racer);
void spawnfunc_vehicle_racer()
{
if(!autocvar_g_vehicle_racer) { remove(self); return; }
- if(!vehicle_initialize(VEH_RACER, FALSE)) { remove(self); return; }
+ if(!vehicle_initialize(VEH_RACER, false)) { remove(self); return; }
}
float v_racer(float req)
{
if(autocvar_g_vehicle_racer_bouncepain)
vehicles_impact(autocvar_g_vehicle_racer_bouncepain_x, autocvar_g_vehicle_racer_bouncepain_y, autocvar_g_vehicle_racer_bouncepain_z);
- return TRUE;
+ return true;
}
case VR_ENTER:
{
if(self.owner.flagcarried)
setorigin(self.owner.flagcarried, '-190 0 96');
- return TRUE;
+ return true;
}
case VR_THINK:
{
- return TRUE;
+ return true;
}
case VR_DEATH:
{
self.think = racer_blowup_think;
self.nextthink = time;
- return TRUE;
+ return true;
}
case VR_SPAWN:
{
self.vehicle_health = autocvar_g_vehicle_racer_health;
self.vehicle_shield = autocvar_g_vehicle_racer_shield;
- return TRUE;
+ return true;
}
case VR_SETUP:
{
self.vehicle_shield = autocvar_g_vehicle_racer_shield;
self.max_health = self.vehicle_health;
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
precache_model ("models/vhshield.md3");
precache_model ("models/vehicles/wakizashi.dpm");
precache_model ("models/vehicles/wakizashi_cockpit.dpm");
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // SVQC
case VR_HUD:
{
if(autocvar_r_letterbox)
- return TRUE;
+ return true;
vector picsize, hudloc = '0 0 0', pic2size, picloc;
drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), waki_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
}
- return TRUE;
+ return true;
}
case VR_SETUP:
{
AuxiliaryXhair[0].axh_image = "gfx/vehicles/axh-bracket.tga";
AuxiliaryXhair[0].axh_scale = 0.25;
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // CSQC
);
#else
-const float RSM_FIRST = 1;
-const float RSM_BOMB = 1;
-const float RSM_FLARE = 2;
-const float RSM_LAST = 2;
+const int RSM_FIRST = 1;
+const int RSM_BOMB = 1;
+const int RSM_FLARE = 2;
+const int RSM_LAST = 2;
#ifdef SVQC
-float autocvar_g_vehicle_raptor;
+bool autocvar_g_vehicle_raptor;
float autocvar_g_vehicle_raptor_respawntime;
float autocvar_g_vehicle_raptor_takeofftime;
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);
+ CSQCProjectile(bomblet, true, PROJECTILE_RAPTORBOMBLET, true);
}
remove(self);
PROJECTILE_MAKETRIGGER(bomb_1);
PROJECTILE_MAKETRIGGER(bomb_2);
- CSQCProjectile(bomb_1, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
- CSQCProjectile(bomb_2, TRUE, PROJECTILE_RAPTORBOMB, TRUE);
+ CSQCProjectile(bomb_1, true, PROJECTILE_RAPTORBOMB, true);
+ CSQCProjectile(bomb_2, true, PROJECTILE_RAPTORBOMB, true);
}
vehicles_projectile("raptor_cannon_muzzleflash", "weapons/lasergun_fire.wav",
gettaginfo(gun, gettagindex(gun, tagname)), normalize(v_forward + randomvec() * autocvar_g_vehicle_raptor_cannon_spread) * autocvar_g_vehicle_raptor_cannon_speed,
autocvar_g_vehicle_raptor_cannon_damage, autocvar_g_vehicle_raptor_cannon_radius, autocvar_g_vehicle_raptor_cannon_force, 0,
- DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, TRUE, TRUE, self.owner);
+ DEATH_VH_RAPT_CANNON, PROJECTILE_RAPTORCANNON, 0, true, true, self.owner);
}
void raptor_land()
}
if(self.vehicle_flags & VHF_SHIELDREGEN)
- vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, TRUE);
+ vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, true);
if(self.vehicle_flags & VHF_HEALTHREGEN)
- vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, FALSE);
+ vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, false);
if(self.vehicle_flags & VHF_ENERGYREGEN)
- vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, FALSE);
+ vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, false);
if(!forbidWeaponUse(player))
if(raptor.vehicle_weapon2mode == RSM_BOMB)
player.PlayerPhysplug = raptor_frame;
if(self.vehicle_flags & VHF_SHIELDREGEN)
- vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, TRUE);
+ vehicles_regen(raptor.dmg_time, vehicle_shield, autocvar_g_vehicle_raptor_shield, autocvar_g_vehicle_raptor_shield_regen_pause, autocvar_g_vehicle_raptor_shield_regen, frametime, true);
if(self.vehicle_flags & VHF_HEALTHREGEN)
- vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, FALSE);
+ vehicles_regen(raptor.dmg_time, vehicle_health, autocvar_g_vehicle_raptor_health, autocvar_g_vehicle_raptor_health_regen_pause, autocvar_g_vehicle_raptor_health_regen, frametime, false);
if(self.vehicle_flags & VHF_ENERGYREGEN)
- vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, FALSE);
+ vehicles_regen(raptor.cnt, vehicle_energy, autocvar_g_vehicle_raptor_energy, autocvar_g_vehicle_raptor_energy_regen_pause, autocvar_g_vehicle_raptor_energy_regen, frametime, false);
raptor.bomb1.alpha = raptor.bomb2.alpha = (time - raptor.lip) / (raptor.delay - raptor.lip);
self.vehicle.vehicle_weapon2mode = RSM_FIRST;
CSQCVehicleSetup(self, 0);
- return TRUE;
+ return true;
case 12:
case 16:
case 19:
self.vehicle.vehicle_weapon2mode = RSM_LAST;
CSQCVehicleSetup(self, 0);
- return TRUE;
+ return true;
/*
case 17: // toss gun, could be used to exit?
break;
*/
}
- return FALSE;
+ return false;
}
void spawnfunc_vehicle_raptor()
{
if(!autocvar_g_vehicle_raptor) { remove(self); return; }
- if(!vehicle_initialize(VEH_RAPTOR, FALSE)) { remove(self); return; }
+ if(!vehicle_initialize(VEH_RAPTOR, false)) { remove(self); return; }
}
float v_raptor(float req)
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;
+ return true;
}
case VR_ENTER:
{
setorigin(self.owner.flagcarried, '-20 0 96');
CSQCVehicleSetup(self.owner, 0);
- return TRUE;
+ return true;
}
case VR_THINK:
{
- return TRUE;
+ return true;
}
case VR_DEATH:
{
self.colormod = '-0.5 -0.5 -0.5';
self.touch = raptor_blowup;
- return TRUE;
+ return true;
}
case VR_SPAWN:
{
self.damageforcescale = 0.25;
self.vehicle_health = autocvar_g_vehicle_raptor_health;
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
- return TRUE;
+ return true;
}
case VR_SETUP:
{
self.vehicle_shield = autocvar_g_vehicle_raptor_shield;
self.max_health = self.vehicle_health;
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
precache_sound ("vehicles/raptor_speed.wav");
precache_sound ("vehicles/missile_alarm.wav");
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // SVQC
case VR_HUD:
{
if(autocvar_r_letterbox)
- return TRUE;
+ return true;
vector picsize, hudloc = '0 0 0', pic2size, picloc;
string raptor_xhair;
drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), raptor_xhair, picsize, '1 1 1', 1, DRAWFLAG_NORMAL);
}
- return TRUE;
+ return true;
}
case VR_SETUP:
{
AuxiliaryXhair[1].axh_image = "gfx/vehicles/axh-bracket.tga";
AuxiliaryXhair[1].axh_scale = 0.25;
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // CSQC
rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
v, normalize(randomvec() * autocvar_g_vehicle_spiderbot_rocket_spread + v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
- DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
+ DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
crosshair_trace(self.owner);
float _dist = (random() * autocvar_g_vehicle_spiderbot_rocket_radius) + vlen(v - trace_endpos);
_dist -= (random() * autocvar_g_vehicle_spiderbot_rocket_radius) ;
rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
- DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, FALSE, self.owner);
+ DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, false, self.owner);
crosshair_trace(self.owner);
rocket.pos1 = trace_endpos;
rocket.nextthink = time;
rocket = vehicles_projectile("spiderbot_rocket_launch", "weapons/rocket_fire.wav",
v, normalize(v_forward) * autocvar_g_vehicle_spiderbot_rocket_speed,
autocvar_g_vehicle_spiderbot_rocket_damage, autocvar_g_vehicle_spiderbot_rocket_radius, autocvar_g_vehicle_spiderbot_rocket_force, 1,
- DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, FALSE, TRUE, self.owner);
+ DEATH_VH_SPID_ROCKET, PROJECTILE_SPIDERROCKET, autocvar_g_vehicle_spiderbot_rocket_health, false, true, self.owner);
crosshair_trace(self.owner);
crosshair_trace(player);
ad = vectoangles(normalize(trace_endpos - ad));
ad = AnglesTransform_ToAngles(AnglesTransform_LeftDivide(AnglesTransform_FromAngles(spider.angles), AnglesTransform_FromAngles(ad))) - spider.tur_head.angles;
- ad = AnglesTransform_Normalize(ad, TRUE);
+ ad = AnglesTransform_Normalize(ad, true);
//UpdateAuxiliaryXhair(player, trace_endpos, ('1 0 0' * player.vehicle_reload2) + ('0 1 0' * (1 - player.vehicle_reload2)), 2);
// Rotate head
else
vehicles_regen(spider.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, FALSE);
+ autocvar_g_vehicle_spiderbot_minigun_ammo_regen, frametime, false);
spiderbot_rocket_do();
if(self.vehicle_flags & VHF_SHIELDREGEN)
- vehicles_regen(spider.dmg_time, vehicle_shield, autocvar_g_vehicle_spiderbot_shield, autocvar_g_vehicle_spiderbot_shield_regen_pause, autocvar_g_vehicle_spiderbot_shield_regen, frametime, TRUE);
+ vehicles_regen(spider.dmg_time, vehicle_shield, autocvar_g_vehicle_spiderbot_shield, autocvar_g_vehicle_spiderbot_shield_regen_pause, autocvar_g_vehicle_spiderbot_shield_regen, frametime, true);
if(self.vehicle_flags & VHF_HEALTHREGEN)
- vehicles_regen(spider.dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime, FALSE);
+ vehicles_regen(spider.dmg_time, vehicle_health, autocvar_g_vehicle_spiderbot_health, autocvar_g_vehicle_spiderbot_health_regen_pause, autocvar_g_vehicle_spiderbot_health_regen, frametime, false);
player.BUTTON_ATCK = player.BUTTON_ATCK2 = 0;
player.vehicle_ammo2 = spider.tur_head.frame;
//centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
CSQCVehicleSetup(self, 0);
- return TRUE;
+ return true;
case 12:
case 16:
case 19:
//centerprint(self, strcat("Rocket mode is ", ftos(self.vehicle.vehicle_weapon2mode)));
CSQCVehicleSetup(self, 0);
- return TRUE;
+ return true;
/*
case 17: // toss gun, could be used to exit?
break;
*/
}
- return FALSE;
+ return false;
}
void spawnfunc_vehicle_spiderbot()
{
if(!autocvar_g_vehicle_spiderbot) { remove(self); return; }
- if(!vehicle_initialize(VEH_SPIDERBOT, FALSE)) { remove(self); return; }
+ if(!vehicle_initialize(VEH_SPIDERBOT, false)) { remove(self); return; }
}
float v_spiderbot(float req)
if(autocvar_g_vehicle_spiderbot_bouncepain)
vehicles_impact(autocvar_g_vehicle_spiderbot_bouncepain_x, autocvar_g_vehicle_spiderbot_bouncepain_y, autocvar_g_vehicle_spiderbot_bouncepain_z);
- return TRUE;
+ return true;
}
case VR_ENTER:
{
setorigin(self.owner.flagcarried, '-20 0 120');
}
- return TRUE;
+ return true;
}
case VR_THINK:
{
if(self.flags & FL_ONGROUND)
movelib_beak_simple(autocvar_g_vehicle_spiderbot_speed_stop);
- return TRUE;
+ return true;
}
case VR_DEATH:
{
CSQCModel_UnlinkEntity(); // networking the death scene would be a nightmare
- return TRUE;
+ return true;
}
case VR_SPAWN:
{
self.PlayerPhysplug = spiderbot_frame;
- return TRUE;
+ return true;
}
case VR_SETUP:
{
self.vehicle_health = autocvar_g_vehicle_spiderbot_health;
self.vehicle_shield = autocvar_g_vehicle_spiderbot_shield;
self.max_health = self.vehicle_health;
- self.pushable = TRUE; // spiderbot can use jumppads
+ self.pushable = true; // spiderbot can use jumppads
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
precache_sound ("vehicles/spiderbot_strafe.wav");
precache_sound ("vehicles/spiderbot_walk.wav");
precache_sound ("vehicles/spiderbot_land.wav");
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // SVQC
case VR_HUD:
{
if(autocvar_r_letterbox)
- return TRUE;
+ return true;
vector picsize, hudloc = '0 0 0', pic2size, picloc;
float i;
drawpic('0.5 0 0' * (vid_conwidth - picsize_x) + '0 0.5 0' * (vid_conheight - picsize_y), spider_xhair, picsize, '1 1 1', autocvar_cl_vehicle_spiderbot_cross_alpha, DRAWFLAG_ADDITIVE);
}
- return TRUE;
+ return true;
}
case VR_SETUP:
{
AuxiliaryXhair[2].axh_image = "gfx/vehicles/axh-special1.tga";
AuxiliaryXhair[2].axh_scale = 0.5;
- return TRUE;
+ return true;
}
case VR_PRECACHE:
{
- return TRUE;
+ return true;
}
}
- return TRUE;
+ return true;
}
#endif // CSQC