From 37caed4604a360dea45d71a27d57dc6a1a9cc216 Mon Sep 17 00:00:00 2001 From: nullifiedcat Date: Mon, 31 Jul 2017 08:08:24 +0300 Subject: [PATCH] weaponselect instead of slot --- src/hacks/FollowBot.cpp | 4 ++-- src/hacks/Walkbot.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/hacks/FollowBot.cpp b/src/hacks/FollowBot.cpp index 878f0b32..898f292e 100644 --- a/src/hacks/FollowBot.cpp +++ b/src/hacks/FollowBot.cpp @@ -247,13 +247,13 @@ void DoWalking() { // If the local player is a medic and user settings allow, then keep the medigun out if (g_pLocalPlayer->clazz == tf_medic && always_medigun) { if (my_slot != 1) { - g_IEngine->ExecuteClientCmd("slot2"); + g_pUserCmd->weaponselect = 1; } // Else we attemt to keep our weapon mimiced with our follow target } else { if (my_slot != owner_slot) { - g_IEngine->ExecuteClientCmd(format("slot", owner_slot + 1).c_str()); + g_pUserCmd->weaponselect = owner_slot; } } } diff --git a/src/hacks/Walkbot.cpp b/src/hacks/Walkbot.cpp index bd12d78e..df73fb78 100644 --- a/src/hacks/Walkbot.cpp +++ b/src/hacks/Walkbot.cpp @@ -698,7 +698,7 @@ void UpdateSlot() { if (vfunc(weapon, 190, 0)(weapon)) { int slot = vfunc(weapon, 395, 0)(weapon); if (slot != int(force_slot) - 1) { - hack::ExecuteCommand(format("slot", int(force_slot))); + g_pUserCmd->weaponselect = int(force_slot) - 1; } } }