From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Wed, 21 Jun 2023 23:59:26 +0000 (+0200) Subject: Revert "try initial bot weapon selection only at join/reset instead of repeatedly... X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=3b4cca1d70eec05a3069cdae5431cb5bf511c24f;p=xonotic%2Fxonotic-data.pk3dir.git Revert "try initial bot weapon selection only at join/reset instead of repeatedly in think, prevents spammed weapon switching attempts if the bot has no weapons" This reverts commit 0ea4b302329b495b3b3a21f5c994081482643c9c. --- diff --git a/qcsrc/server/client.qc b/qcsrc/server/client.qc index 8783c0bac..645017726 100644 --- a/qcsrc/server/client.qc +++ b/qcsrc/server/client.qc @@ -2287,11 +2287,6 @@ void ObserverOrSpectatorThink(entity this) CS(this).autojoin_checked = true; TRANSMUTE(Player, this); PutClientInServer(this); - - .entity weaponentity = weaponentities[0]; - if(this.(weaponentity).m_weapon == WEP_Null) - W_NextWeapon(this, 0, weaponentity); - return; } diff --git a/qcsrc/server/command/vote.qc b/qcsrc/server/command/vote.qc index b5f70143d..12e130c9e 100644 --- a/qcsrc/server/command/vote.qc +++ b/qcsrc/server/command/vote.qc @@ -25,7 +25,6 @@ #include #include #include -#include #include // ============================================= @@ -412,13 +411,6 @@ void reset_map(bool dorespawn, bool is_fake_round_start) it.avelocity = '0 0 0'; CS(it).movement = '0 0 0'; PutClientInServer(it); - - if(IS_BOT_CLIENT(it)) - { - .entity weaponentity = weaponentities[0]; - if(it.(weaponentity).m_weapon == WEP_Null) - W_NextWeapon(it, 0, weaponentity); - } }); } }