Correctly initialize start ammo in instagib
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / mutators / mutator_instagib.qc
index 34208d3..cd0ebdd 100644 (file)
@@ -289,12 +289,17 @@ MUTATOR_HOOKFUNCTION(instagib_PlayerDamage)
 
 MUTATOR_HOOKFUNCTION(instagib_SetStartItems)
 {
-       start_ammo_cells = cvar("g_instagib_ammo_start");
+       start_health       = warmup_start_health       = 100;
+       start_armorvalue   = warmup_start_armorvalue   = 0;
 
-       start_health = 100;
-       start_armorvalue = 0;
-       start_weapons = WEPSET_VAPORIZER;
-       warmup_start_weapons = WEPSET_VAPORIZER;
+       start_ammo_shells  = warmup_start_ammo_shells  = 0;
+       start_ammo_nails   = warmup_start_ammo_nails   = 0;
+       start_ammo_cells   = warmup_start_ammo_cells   = cvar("g_instagib_ammo_start");
+       start_ammo_plasma  = warmup_start_ammo_plasma  = 0;
+       start_ammo_rockets = warmup_start_ammo_rockets = 0;
+       start_ammo_fuel    = warmup_start_ammo_fuel    = 0;
+
+       start_weapons = warmup_start_weapons = WEPSET_VAPORIZER;
        start_items |= IT_UNLIMITED_SUPERWEAPONS;
 
        return FALSE;