]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/w_minelayer.qc
Also complain when reaching the limit, so the player knows why he can't place any...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / w_minelayer.qc
index 7884ea57cf8d52f504e585749b190aeac8ead486..de65da56178ab50ac4b3de6e14011e8b2ffffd46 100644 (file)
@@ -149,7 +149,12 @@ void W_Mine_Attack (void)
                                self.mine_number += 1;
 
                if(self.mine_number >= cvar("g_balance_minelayer_limit"))
+               {
+                       // the refire delay keeps this message from being spammed
+                       sprint(self, strcat("You cannot place more than ^2", cvar_string("g_balance_minelayer_limit"), " ^7mines at a time\n") );
+                       play2(self, "weapons/unavailable.wav");
                        return;
+               }
        }
 
        if not(self.items & IT_UNLIMITED_WEAPON_AMMO)