Fix Wallbuster shuffling code.

This commit is contained in:
Mari the Deer 2020-06-13 23:51:30 +02:00
commit 3e31fd36ac
2 changed files with 3 additions and 2 deletions

View file

@ -111,7 +111,8 @@ Class WallbusterReloadMenu : GenericMenu
continue;
candidates.Push(i);
}
sel0 = Random[WallbusterMenu](0,candidates.Size()-1);
if ( candidates.Size() <= 0 ) return;
sel0 = candidates[Random[WallbusterMenu](0,candidates.Size()-1)];
CVar.GetCVar('swwm_cbtlast',players[consoleplayer]).SetInt(sel0);
AmmoSets[sel0]++;
queue.Push(sel0);