From 1073e4b674ccd3157c9953323f86cad598316381 Mon Sep 17 00:00:00 2001 From: "Dr. Jaska" Date: Thu, 29 Dec 2022 16:49:15 +0000 Subject: [PATCH] flip bot_primary_fireballmooth boolean so bots are able to fire fireball alt fire randomly --- .gitlab-ci.yml | 2 +- qcsrc/common/weapons/weapon/fireball.qc | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 62a9fa393e..351047359f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -69,7 +69,7 @@ test_sv_game: - wget -nv -O data/maps/stormkeep.waypoints https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints - wget -nv -O data/maps/stormkeep.waypoints.cache https://gitlab.com/xonotic/xonotic-maps.pk3dir/raw/master/maps/stormkeep.waypoints.cache - - EXPECT=4c834aa9b5950ffe25deec1880f21641 + - EXPECT=ed5f16b28f1662f147d51b44cbc4edf2 - HASH=$(${ENGINE} +timestamps 1 +exec serverbench.cfg | tee /dev/stderr | sed -e 's,^\[[^]]*\] ,,' diff --git a/qcsrc/common/weapons/weapon/fireball.qc b/qcsrc/common/weapons/weapon/fireball.qc index 391aa7294c..363b1d6941 100644 --- a/qcsrc/common/weapons/weapon/fireball.qc +++ b/qcsrc/common/weapons/weapon/fireball.qc @@ -345,7 +345,7 @@ METHOD(Fireball, wr_aim, void(entity thiswep, entity actor, .entity weaponentity if(bot_aim(actor, weaponentity, WEP_CVAR_PRI(fireball, speed), 0, WEP_CVAR_PRI(fireball, lifetime), false, false)) { PHYS_INPUT_BUTTON_ATCK(actor) = true; - if(random() < 0.02) actor.bot_primary_fireballmooth = 0; + if(random() < 0.02) actor.bot_primary_fireballmooth = 1; } } else @@ -353,7 +353,7 @@ METHOD(Fireball, wr_aim, void(entity thiswep, entity actor, .entity weaponentity if(bot_aim(actor, weaponentity, WEP_CVAR_SEC(fireball, speed), WEP_CVAR_SEC(fireball, speed_up), WEP_CVAR_SEC(fireball, lifetime), true, false)) { PHYS_INPUT_BUTTON_ATCK2(actor) = true; - if(random() < 0.01) actor.bot_primary_fireballmooth = 1; + if(random() < 0.01) actor.bot_primary_fireballmooth = 0; } } } -- 2.39.2