]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_nex.qc
Fix new clienttype checks
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_nex.qc
index 6c550831fd554cd9aaab606d8a461bdb21a74137..23dcce96d81a73fa8e2e3ab2e51cd56dbb2189cf 100644 (file)
@@ -66,7 +66,7 @@ void W_Nex_Attack (float issecondary)
        FireRailgunBullet (w_shotorg, w_shotorg + w_shotdir * MAX_SHOT_DISTANCE, mydmg, myforce, mymindist, mymaxdist, myhalflife, myforcehalflife, WEP_NEX);
 
        if(yoda && flying)
-               AnnounceTo(self, "yoda");
+               Send_Notification(NOTIF_ONE, self, MSG_ANNCE, ANNCE_ACHIEVEMENT_YODA); 
 
        //beam and muzzle flash done on client
        SendCSQCNexBeamParticle(charge);
@@ -217,16 +217,30 @@ float w_nex(float req)
        }
        else if (req == WR_CHECKAMMO2)
        {
-               // don't allow charging if we don't have enough ammo
-               ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo;
-               ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo;
-               return ammo_amount;
+               if(autocvar_g_balance_nex_secondary)
+               {
+                       // don't allow charging if we don't have enough ammo
+                       ammo_amount = self.ammo_cells >= autocvar_g_balance_nex_secondary_ammo;
+                       ammo_amount += self.(weapon_load[WEP_NEX]) >= autocvar_g_balance_nex_secondary_ammo;    
+                       return ammo_amount;
+               }
+               else
+               {
+                       return FALSE; // zoom is not a fire mode
+               }
        }
        else if (req == WR_RELOAD)
        {
                W_Reload(min(autocvar_g_balance_nex_primary_ammo, autocvar_g_balance_nex_secondary_ammo), autocvar_g_balance_nex_reload_ammo, autocvar_g_balance_nex_reload_time, "weapons/reload.wav");
        }
-
+       else if (req == WR_SUICIDEMESSAGE)
+       {
+               return WEAPON_THINKING_WITH_PORTALS;
+       }
+       else if (req == WR_KILLMESSAGE)
+       {
+               return WEAPON_NEX_MURDER;
+       }
        return TRUE;
 }
 #endif
@@ -245,10 +259,6 @@ float w_nex(float req)
        {
                precache_sound("weapons/neximpact.wav");
        }
-       else if (req == WR_SUICIDEMESSAGE)
-               w_deathtypestring = _("%s is now thinking with portals");
-       else if (req == WR_KILLMESSAGE)
-               w_deathtypestring = _("%s has been vaporized by %s's nex");
        return TRUE;
 }
 #endif