]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Display only icons of existing weapons (and attacks) in the special command effect
authorterencehill <piuntn@gmail.com>
Sun, 13 Jun 2021 12:47:33 +0000 (14:47 +0200)
committerterencehill <piuntn@gmail.com>
Sun, 13 Jun 2021 12:47:33 +0000 (14:47 +0200)
qcsrc/client/view.qc

index 7835908cb88ec1e88b0ba8aed8a1bc12c8346c89..1a01662d1b910661da2b7654b7e695309ca28988 100644 (file)
@@ -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);