From 4c8198e687bdb90b44678b99c3d2b6dbb33ab7d9 Mon Sep 17 00:00:00 2001 From: FutureRave Date: Mon, 24 Jan 2022 02:08:28 +0000 Subject: [PATCH] Fix weapon check --- src/Components/Modules/Bots.cpp | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/Components/Modules/Bots.cpp b/src/Components/Modules/Bots.cpp index 991a18cd..a3181a48 100644 --- a/src/Components/Modules/Bots.cpp +++ b/src/Components/Modules/Bots.cpp @@ -166,12 +166,6 @@ namespace Components { const auto* weapon = Game::Scr_GetString(0); - if (weapon == nullptr) - { - Game::Scr_ParamError(0, "^1BotWeapon: Illegal parameter!\n"); - return; - } - const auto* gentity = Script::GetEntFromEntRef(entref); const auto* client = Script::GetClientFromEnt(gentity); @@ -181,7 +175,7 @@ namespace Components return; } - if (weapon[0] == '\0') + if (weapon == nullptr || weapon[0] == '\0') { g_botai[entref.entnum].weapon = 1; return;