From: terencehill Date: Sun, 13 Jun 2021 12:47:33 +0000 (+0200) Subject: Display only icons of existing weapons (and attacks) in the special command effect X-Git-Tag: xonotic-v0.8.5~405^2~5 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=cc1f4b71dd5464450b5ccb84d7901064d5a63cfd;p=xonotic%2Fxonotic-data.pk3dir.git Display only icons of existing weapons (and attacks) in the special command effect --- diff --git a/qcsrc/client/view.qc b/qcsrc/client/view.qc index 7835908cb..1a01662d1 100644 --- a/qcsrc/client/view.qc +++ b/qcsrc/client/view.qc @@ -898,7 +898,7 @@ void SpecialCommand() { slot.x = bound(0, (random() * vid_conwidth + 1), vid_conwidth); slot.y = 1; // start it off 0 so we can use it - slot.z = floor(random() * REGISTRY_MAX(Weapons)); + slot.z = floor(random() * REGISTRY_COUNT(Weapons)); sc_spawntime = time + bound(0.4, random(), 0.75); // prevent spawning another one for this amount of time! vector newcolor = randomvec() * 2; newcolor.x = bound(0.4, newcolor.x, 1);