diff --git a/src/hacks/AutoHeal.cpp b/src/hacks/AutoHeal.cpp index 3eb2ed60..f8e9593c 100644 --- a/src/hacks/AutoHeal.cpp +++ b/src/hacks/AutoHeal.cpp @@ -315,6 +315,12 @@ static CatCommand heal_steamid( if (args.ArgC() < 2) { logging::Info("Invalid call!"); + force_healing_target = 0; + return; + } + if (strtol(args.Arg(1), nullptr, 10) == 0x0) + { + force_healing_target = 0; return; } for (int i = 1; i <= 32 && i < HIGHEST_ENTITY; i++) diff --git a/src/hacks/FollowBot.cpp b/src/hacks/FollowBot.cpp index 66424cf2..f7359a1d 100644 --- a/src/hacks/FollowBot.cpp +++ b/src/hacks/FollowBot.cpp @@ -184,7 +184,7 @@ void WorldTick() if (CE_BAD(entity)) // Exist + dormant continue; if (i == follow_target) - break; + continue; if (entity->m_Type() != ENTITY_PLAYER) continue; if (steamid != entity->player_info.friendsID) // steamid check @@ -211,11 +211,11 @@ void WorldTick() } // If we dont have a follow target from that, we look again for someone // else who is suitable - if ((!follow_target || change || ClassPriority(ENTITY(follow_target)) < 6) && roambot) + if ((!follow_target || change || (ClassPriority(ENTITY(follow_target)) < 6 && ENTITY(follow_target)->player_info.friendsID != steamid)) && roambot) { // Try to get a new target - auto ent_count = HIGHEST_ENTITY; - for (int i = 0; i < HIGHEST_ENTITY; i++) + auto ent_count = followcart ? HIGHEST_ENTITY : g_IEngine->GetMaxClients(); + for (int i = 0; i < ent_count; i++) { auto entity = ENTITY(i); if (CE_BAD(entity)) // Exist + dormant