Merge pull request #530 from TotallyNotElite/backtrackfix
Fix Backtrack not recognizing non-melee weapons correctly
This commit is contained in:
commit
89bd86807b
@ -11,7 +11,7 @@ rm ../install-all # remove install file
|
||||
# Install base Dependencies
|
||||
#
|
||||
if [ -f "/etc/arch-release" ]; then
|
||||
sudo pacman -S --needed --noconfirm boost cmake make lib32-openssl lib32-libpng gcc gdb lib32-sdl2 lib32-glew freetype2
|
||||
sudo pacman -S --needed --noconfirm boost cmake make lib32-openssl lib32-libpng gcc gdb lib32-sdl2 lib32-glew freetype2 rsync
|
||||
else
|
||||
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
|
||||
sudo apt update
|
||||
|
@ -201,7 +201,8 @@ bool BacktrackAimbot()
|
||||
{
|
||||
bool good_tick = false;
|
||||
for (int j = 0; j < 12; ++j)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick && hacks::shared::backtrack::sorted_ticks[j].tickcount != FLT_MAX)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick &&
|
||||
hacks::shared::backtrack::sorted_ticks[j].tickcount != INT_MAX)
|
||||
good_tick = true;
|
||||
tickcnt++;
|
||||
if (!i.hitboxpos.z)
|
||||
|
@ -52,7 +52,7 @@ void CreateMove()
|
||||
{
|
||||
bool good_tick = false;
|
||||
for (int j = 0; j < 12; ++j)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick && hacks::shared::backtrack::sorted_ticks[j].tickcount != INT_MAX)
|
||||
good_tick = true;
|
||||
tickcnt++;
|
||||
if (!good_tick)
|
||||
|
@ -9,8 +9,10 @@
|
||||
#include "hacks/Backtrack.hpp"
|
||||
#include <boost/circular_buffer.hpp>
|
||||
#include <glez/draw.hpp>
|
||||
#define IsMelee GetWeaponMode() == weapon_melee
|
||||
|
||||
bool IsMelee()
|
||||
{
|
||||
return GetWeaponMode() == weapon_melee;
|
||||
}
|
||||
namespace hacks::shared::backtrack
|
||||
{
|
||||
CatVar enable(CV_SWITCH, "backtrack", "0", "Enable backtrack",
|
||||
@ -174,7 +176,8 @@ void Run()
|
||||
{
|
||||
bool good_tick = false;
|
||||
for (int i = 0; i < 12; ++i)
|
||||
if (t == sorted_ticks[i].tick && sorted_ticks[i].tickcount != FLT_MAX)
|
||||
if (t == sorted_ticks[i].tick &&
|
||||
sorted_ticks[i].tickcount != INT_MAX && sorted_ticks[i].tickcount)
|
||||
good_tick = true;
|
||||
if (!good_tick)
|
||||
continue;
|
||||
|
@ -86,7 +86,7 @@ bool CanBacktrack()
|
||||
{
|
||||
bool good_tick = false;
|
||||
for (int j = 0; j < 12; ++j)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick)
|
||||
if (tickcnt == hacks::shared::backtrack::sorted_ticks[j].tick && hacks::shared::backtrack::sorted_ticks[j].tickcount != INT_MAX)
|
||||
good_tick = true;
|
||||
tickcnt++;
|
||||
if (!good_tick)
|
||||
|
Reference in New Issue
Block a user