[nexuiz-commits] r7141 - trunk/data/qcsrc/server

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Fri Jul 3 05:58:48 EDT 2009


Author: mrbougo
Date: 2009-07-03 05:58:48 -0400 (Fri, 03 Jul 2009)
New Revision: 7141

Modified:
   trunk/data/qcsrc/server/miscfunctions.qc
   trunk/data/qcsrc/server/t_items.qc
Log:
nixnex: add support for g_use_ammunition 0, g_nixnex_with_powerups, g_nixnex_with_healtharmor

Modified: trunk/data/qcsrc/server/miscfunctions.qc
===================================================================
--- trunk/data/qcsrc/server/miscfunctions.qc	2009-07-03 09:10:24 UTC (rev 7140)
+++ trunk/data/qcsrc/server/miscfunctions.qc	2009-07-03 09:58:48 UTC (rev 7141)
@@ -808,6 +808,8 @@
         for (i = WEP_FIRST; i <= WEP_LAST; ++i)
             if (NixNex_CanChooseWeapon(i))
                 weapon_action(i, WR_PRECACHE);
+        if(!cvar("g_use_ammunition"))
+        	start_items |= IT_UNLIMITED_AMMO;
     }
     else if (g_weaponarena)
     {

Modified: trunk/data/qcsrc/server/t_items.qc
===================================================================
--- trunk/data/qcsrc/server/t_items.qc	2009-07-03 09:10:24 UTC (rev 7140)
+++ trunk/data/qcsrc/server/t_items.qc	2009-07-03 09:58:48 UTC (rev 7141)
@@ -646,8 +646,37 @@
 				return;
 			}
 		}
-		else if ((!cvar("g_pickup_items") || g_nixnex) && itemid != IT_STRENGTH && itemid != IT_INVINCIBLE && itemid != IT_HEALTH)
+		else if (g_nixnex)
 		{
+			local float rm;
+
+			rm = 1;
+			switch (itemid)
+			{
+				case IT_HEALTH:
+				case IT_5HP:
+				case IT_25HP:
+				case IT_ARMOR:
+				case IT_ARMOR_SHARD:
+					if (cvar("g_nixnex_with_healtharmor"))
+						rm = 0;
+					break;
+				case IT_STRENGTH:
+				case IT_INVINCIBLE:
+					if (cvar("g_nixnex_with_powerups"))
+						rm = 0;
+					break;
+			}
+
+			if(rm)
+			{
+				startitem_failed = TRUE;
+				remove (self);
+				return;
+			}
+		}
+		else if (!cvar("g_pickup_items") && itemid != IT_STRENGTH && itemid != IT_INVINCIBLE && itemid != IT_HEALTH)
+		{
 			startitem_failed = TRUE;
 			remove (self);
 			return;



More information about the nexuiz-commits mailing list