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

@ -1,2 +1,2 @@
[default]
SWWM_MODVER="\cxSWWM GZ\c- r344 (Sat 13 Jun 23:35:07 CEST 2020)";
SWWM_MODVER="\cxSWWM GZ\c- r345 (Sat 13 Jun 23:51:31 CEST 2020)";

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);