]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_laser.qc
Merge branch 'master' into mario/mutator_minstagib
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_laser.qc
index a34695ee8b61acec2b3e6748c7f3023a6c51fbd2..f2a4ba281509d6ff7df6a9f17a3d613e684a1b46 100644 (file)
@@ -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
@@ -34,19 +34,11 @@ void W_Laser_Attack (float issecondary)
        entity missile;
        vector s_forward;
        float a;
-       float nodamage;
-
-       if(issecondary == 2) // minstanex shot
-               nodamage = g_minstagib;
-       else
-               nodamage = FALSE;
 
        a = autocvar_g_balance_laser_primary_shotangle;
        s_forward = v_forward * cos(a * DEG2RAD) + v_up * sin(a * DEG2RAD);
 
-       if(nodamage)
-               W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, 0);
-       else if(issecondary == 1)
+       if(issecondary == 1)
                W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_secondary_damage);
        else
                W_SetupShot_Dir (self, s_forward, FALSE, 3, "weapons/lasergun_fire.wav", CH_WEAPON_B, autocvar_g_balance_laser_primary_damage);
@@ -56,11 +48,8 @@ void W_Laser_Attack (float issecondary)
        missile.owner = missile.realowner = self;
        missile.classname = "laserbolt";
        missile.dmg = 0;
-       if(!nodamage)
-       {
-               missile.bot_dodge = TRUE;
-               missile.bot_dodgerating = autocvar_g_balance_laser_primary_damage;
-       }
+       missile.bot_dodge = TRUE;
+       missile.bot_dodgerating = autocvar_g_balance_laser_primary_damage;
 
        PROJECTILE_MAKETRIGGER(missile);
        missile.projectiledeathtype = WEP_LASER;
@@ -75,6 +64,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;
@@ -290,8 +280,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 +306,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