]> de.git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/weapons/weapon/devastator.qc
Intrusify bot targets
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / weapons / weapon / devastator.qc
index d44ee7ec20842fcc2bdb2bbf4a506356e5c1463f..a99bce47ed9a9dd5527e0defb6586d3ba6c939c3 100644 (file)
@@ -463,7 +463,7 @@ METHOD(Devastator, wr_aim, void(entity thiswep, entity actor))
         IL_EACH(g_projectiles, it.realowner == actor && it.classname == "rocket",
         {
             entity rocket = it;
-            FOREACH_ENTITY_FLOAT(bot_attack, true,
+            IL_EACH(g_bot_targets, it.bot_attack,
             {
                float d = vlen(it.origin + (it.mins + it.maxs) * 0.5 - rocket.origin);
                d = bound(0, edgedamage + (coredamage - edgedamage) * sqrt(1 - d * recipricoledgeradius), 10000);
@@ -489,7 +489,7 @@ METHOD(Devastator, wr_aim, void(entity thiswep, entity actor))
             if(skill > 9) // normal players only do this for the target they are tracking
             {
                    entity rocket = it;
-                   FOREACH_ENTITY_FLOAT(bot_attack, true,
+                   IL_EACH(g_bot_targets, it.bot_attack,
                    {
                        if((v_forward * normalize(rocket.origin - it.origin) < 0.1)
                            && desirabledamage > 0.1 * coredamage