X-Git-Url: http://de.git.xonotic.org/?a=blobdiff_plain;f=qcsrc%2Fserver%2Fw_laser.qc;h=69dcb17aa5c292d4328b539668c8dac674f76935;hb=0c9508cd9408c667e2a16f9cce72643c62fe884c;hp=fa52a6e0dfb6ad2f7877538874af8333eefb2621;hpb=c7e1f5b4e123bfcfcb9f259090b275f4e7aeab30;p=xonotic%2Fxonotic-data.pk3dir.git diff --git a/qcsrc/server/w_laser.qc b/qcsrc/server/w_laser.qc index fa52a6e0d..69dcb17aa 100644 --- a/qcsrc/server/w_laser.qc +++ b/qcsrc/server/w_laser.qc @@ -9,7 +9,7 @@ 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 @@ -31,7 +31,7 @@ void W_Laser_Think() void W_Laser_Attack (float issecondary) { - local entity missile; + entity missile; vector s_forward; float a; float nodamage; @@ -75,6 +75,7 @@ void W_Laser_Attack (float issecondary) 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; @@ -215,8 +216,8 @@ void spawnfunc_weapon_laser (void) 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) @@ -290,8 +291,16 @@ float w_laser(float req) { 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) @@ -308,15 +317,6 @@ 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