self.ammo_fuel = warmup_start_ammo_fuel;
self.health = warmup_start_health;
self.armorvalue = warmup_start_armorvalue;
-
- if(g_warmup_allguns == 2)
- self.weapons = warmup_start_weapons;
- else if(g_warmup_allguns == 1)
- self.weapons = (warmup_start_weapons & (weaponsInMap | start_weapons));
+ self.weapons = WARMUP_START_WEAPONS;
}
else
{
WepSet warmup_start_weapons;
WepSet warmup_start_weapons_default;
WepSet warmup_start_weapons_defaultmask;
+#define WARMUP_START_WEAPONS ((g_warmup_allguns == 1) ? (warmup_start_weapons & (weaponsInMap | start_weapons)) : warmup_start_weapons)
float warmup_start_ammo_shells;
float warmup_start_ammo_nails;
float warmup_start_ammo_rockets;
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- float w = want_weapon("g_start_weapon_", e, cvar("g_warmup_allguns"));
+ float w = want_weapon("g_start_weapon_", e, g_warmup_allguns);
if(w & 1)
warmup_start_weapons |= WepSet_FromWeapon(i);
if(w & 2)
warmup_start_ammo_fuel = max(warmup_start_ammo_fuel, cvar("g_balance_fuel_rotstable"));
}
+ WepSet precache_weapons = start_weapons;
+ if (g_warmup_allguns != 1)
+ precache_weapons |= warmup_start_weapons;
for (i = WEP_FIRST; i <= WEP_LAST; ++i)
{
e = get_weaponinfo(i);
- if((start_weapons | warmup_start_weapons) & WepSet_FromWeapon(i))
+ if(precache_weapons & WepSet_FromWeapon(i))
weapon_action(i, WR_PRECACHE);
}