]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/gamemodes/gamemode/nexball/nexball.qc
Unhardcode a few more 0 slot cases
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / gamemodes / gamemode / nexball / nexball.qc
index c26ef4619561548d36b233562f1b9d168ee65a52..29bdd265fc5f2a6dc59629b41c1250c3d8e5d6de 100644 (file)
@@ -1025,8 +1025,11 @@ MUTATOR_HOOKFUNCTION(nb, PlayerSpawn)
        entity player = M_ARGV(0, entity);
 
        player.metertime = 0;
-       .entity weaponentity = weaponentities[0];
-       player.(weaponentity).weapons = '0 0 0';
+       for(int slot = 0; slot < MAX_WEAPONSLOTS; ++slot)
+       {
+               .entity weaponentity = weaponentities[slot];
+               player.(weaponentity).weapons = '0 0 0';
+       }
 
        if (nexball_mode & NBM_BASKETBALL)
                player.weapons |= WEPSET(NEXBALL);