]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/nix/sv_nix.qc
Registry API: add REGISTRY_GET
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / nix / sv_nix.qc
index 7214a699e1122e759026f2b5995ee4a99305a943..b399d3c62f68893cc2822eb09ac23bf3a891a1aa 100644 (file)
@@ -80,7 +80,7 @@ REGISTER_MUTATOR(nix, expr_evaluate(cvar_string("g_nix")) && !MUTATOR_IS_ENABLED
 
 bool NIX_CanChooseWeapon(int wpn)
 {
-       entity e = Weapons_from(wpn);
+       entity e = REGISTRY_GET(Weapons, wpn);
        if (e == WEP_Null) return false; // skip dummies
        if(g_weaponarena)
        {
@@ -125,12 +125,12 @@ void NIX_GiveCurrentWeapon(entity this)
                        nix_nextchange = time; // start the first round now!
                else
                        nix_nextchange = time + autocvar_g_balance_nix_roundtime;
-               // Weapon w = Weapons_from(nix_weapon);
+               // Weapon w = REGISTRY_GET(Weapons, nix_weapon);
                // w.wr_init(w); // forget it, too slow
        }
 
        // get weapon info
-       entity wpn = Weapons_from(nix_weapon);
+       entity wpn = REGISTRY_GET(Weapons, nix_weapon);
 
        if(nix_nextchange != this.nix_lastchange_id) // this shall only be called once per round!
        {