#else
#ifdef SVQC
void(float imp) W_SwitchWeapon;
+void() W_LastWeapon;
void W_Laser_Touch (void)
{
PROJECTILE_TOUCH;
- self.event_damage = SUB_Null;
+ self.event_damage = func_null;
if (self.dmg)
RadiusDamage (self, self.realowner, autocvar_g_balance_laser_secondary_damage, autocvar_g_balance_laser_secondary_edgedamage, autocvar_g_balance_laser_secondary_radius, world, autocvar_g_balance_laser_secondary_force, self.projectiledeathtype, other);
else
void W_Laser_Attack (float issecondary)
{
- local entity missile;
+ entity missile;
vector s_forward;
float a;
float nodamage;
missile.touch = W_Laser_Touch;
missile.flags = FL_PROJECTILE;
+ missile.missile_flags = MIF_SPLASH;
missile.think = W_Laser_Think;
missile.nextthink = time + autocvar_g_balance_laser_primary_delay;
float w_laser(float req)
{
- local float r1;
- local float r2;
+ float r1;
+ float r2;
if (req == WR_AIM)
{
if(autocvar_g_balance_laser_secondary)
else
{
if(self.switchweapon == WEP_LASER) // don't do this if already switching
- W_SwitchWeapon (self.cnt);
+ W_LastWeapon();
}
}
}
{
W_Reload(0, autocvar_g_balance_laser_reload_ammo, autocvar_g_balance_laser_reload_time, "weapons/reload.wav");
}
+ else if (req == WR_SUICIDEMESSAGE)
+ {
+ return WEAPON_LASER_SUICIDE;
+ }
+ else if (req == WR_KILLMESSAGE)
+ {
+ return WEAPON_LASER_MURDER;
+ }
return TRUE;
-};
+}
#endif
#ifdef CSQC
float w_laser(float req)
{
precache_sound("weapons/laserimpact.wav");
}
- else if (req == WR_SUICIDEMESSAGE)
- w_deathtypestring = _("%s lasered themself to hell");
- else if (req == WR_KILLMESSAGE)
- {
- if(w_deathtype & HITTYPE_SECONDARY)
- w_deathtypestring = _("%s was cut in half by %s's gauntlet"); // unchecked: SPLASH
- else
- w_deathtypestring = _("%s was lasered to death by %s"); // unchecked: SPLASH
- }
return TRUE;
}
#endif