From 3b4cca1d70eec05a3069cdae5431cb5bf511c24f Mon Sep 17 00:00:00 2001 From: Juhu <5894800-Juhu_@users.noreply.gitlab.com> Date: Thu, 22 Jun 2023 01:59:26 +0200 Subject: [PATCH] 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. --- qcsrc/server/client.qc | 5 ----- qcsrc/server/command/vote.qc | 8 -------- 2 files changed, 13 deletions(-) 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); - } }); } } -- 2.39.2