if(wa & j)
{
ammofield = Item_CounterField(j);
- wep.ammofield = 0;
// if our weapon is loaded, give its load back to the player
if(self.(weapon_load[self.weapon]) > 0)
own.ammofield += self.(weapon_load[self.weapon]);
self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading
}
+
+ wep.ammofield = 0;
}
}
}
if(wa & j)
{
ammofield = Item_CounterField(j);
- thisammo = min(own.ammofield, wep.ammofield);
- wep.ammofield = thisammo;
- own.ammofield -= thisammo;
- s = strcat(s, " and ", ftos(thisammo), " ", Item_CounterFieldName(j));
// if our weapon is loaded, give its load back to the player
if(self.(weapon_load[self.weapon]) > 0)
own.ammofield += self.(weapon_load[self.weapon]);
self.(weapon_load[self.weapon]) = -1; // schedule the weapon for reloading
}
+
+ thisammo = min(own.ammofield, wep.ammofield);
+ wep.ammofield = thisammo;
+ own.ammofield -= thisammo;
+ s = strcat(s, " and ", ftos(thisammo), " ", Item_CounterFieldName(j));
}
}
s = substring(s, 5, -1);
return 0;
if (g_nexball && w == WEP_GRENADE_LAUNCHER)
return 0;
-
+ if(w == 0)
+ return 0;
+
wa = W_AmmoItemCode(w);
if(WEPSET_CONTAINS_AW(start_weapons, w))
{
self.currentammo = 1;
#endif
}
+
+string W_Apply_Weaponreplace(string in)
+{
+ float n = tokenize_console(in);
+ string out = "";
+ float i;
+ for(i = 0; i < n; ++i)
+ {
+ string s = argv(i);
+ string r = cvar_string(strcat("g_weaponreplace_", s));
+ if(r == "")
+ out = strcat(out, " ", s);
+ else if(r != "0")
+ out = strcat(out, " ", r);
+ }
+ return substring(out, 1, -1);
+}