]> git.xonotic.org Git - xonotic/xonotic-data.pk3dir.git/blobdiff - qcsrc/common/mutators/mutator/overkill/okshotgun.qc
Bot AI: improve bots aim by requiring they aim at the target (with some tolerance...
[xonotic/xonotic-data.pk3dir.git] / qcsrc / common / mutators / mutator / overkill / okshotgun.qc
index da4c4749d04763e4fab32d8624e00ab11e1430d3..6b4b3aa8e76ee0d4063ff4d6816f72e0607bc377 100644 (file)
@@ -5,11 +5,11 @@ METHOD(OverkillShotgun, wr_aim, void(entity thiswep, entity actor, .entity weapo
 {
        if (vdist(actor.origin - actor.enemy.origin, >, WEP_CVAR_PRI(okshotgun, bot_range)))
        {
-               PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false);
+               PHYS_INPUT_BUTTON_ATCK2(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false, false);
        }
        else
        {
-               PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false);
+               PHYS_INPUT_BUTTON_ATCK(actor) = bot_aim(actor, weaponentity, 1000000, 0, 0.001, false, false);
        }
 }
 
@@ -28,7 +28,7 @@ METHOD(OverkillShotgun, wr_think, void(entity thiswep, entity actor, .entity wea
                        FOREACH_CLIENT(true, LAMBDA(
                                if (it == actor || (IS_SPEC(it) && it.enemy == actor))
                                {
-                                       wframe_send(it, actor.(weaponentity), WFRAME_FIRE2, g_weaponratefactor, true);
+                                       wframe_send(it, actor.(weaponentity), WFRAME_FIRE2, autocvar_g_weaponratefactor, true);
                                }
                        ));
                        animdecide_setaction(actor, ANIMACTION_SHOOT, true);