]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/server/bot/default/scripting.qc
Registry API: add REGISTRY_GET
[xonotic/xonotic-data.pk3dir.git] / qcsrc / server / bot / default / scripting.qc
index 9c2c6825db0342164159eef90cd99c0e59f8ca91..955d15af6a7b270b71ee7b4467dae04c937f696d 100644 (file)
@@ -588,10 +588,10 @@ float bot_cmd_select_weapon(entity this)
                if(this.(weaponentity).m_weapon == WEP_Null && slot != 0)
                        continue;
 
-               if(client_hasweapon(this, Weapons_from(id), weaponentity, true, false))
+               if(client_hasweapon(this, REGISTRY_GET(Weapons, id), weaponentity, true, false))
                {
                        success = true;
-                       this.(weaponentity).m_switchweapon = Weapons_from(id);
+                       this.(weaponentity).m_switchweapon = REGISTRY_GET(Weapons, id);
                }
        }