Fix backtrack crashes
This commit is contained in:
parent
b24671c10e
commit
caa9e7c84e
@ -114,7 +114,7 @@ endif()
|
||||
configure_file(include/config.h.in ${CMAKE_SOURCE_DIR}/include/config.h @ONLY)
|
||||
configure_file(include/version.h.in ${CMAKE_SOURCE_DIR}/include/version.h @ONLY)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "-m32 -march=native -fexceptions -fno-gnu-unique -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS "-m32 -march=native -fexceptions -DNDEBUG")
|
||||
set(CMAKE_CXX_FLAGS_DEBUG "-rdynamic -ggdb -Og")
|
||||
set(CMAKE_CXX_FLAGS_RELEASE "-O3")
|
||||
|
||||
|
@ -61,7 +61,7 @@ struct CIncomingSequence
|
||||
};
|
||||
typedef boost::circular_buffer_space_optimized<CIncomingSequence> circular_buf;
|
||||
extern circular_buf sequences;
|
||||
extern BacktrackData headPositions[32][66];
|
||||
extern BacktrackData headPositions[33][66];
|
||||
|
||||
extern bool isBacktrackEnabled;
|
||||
extern bool Vischeck_Success;
|
||||
|
@ -187,7 +187,7 @@ constexpr rgba_t Health_dimgreen(int health, int max)
|
||||
float hf = float(health) / float(max);
|
||||
if (hf > 1)
|
||||
{
|
||||
return colors::FromRGBA8(0, 128, 0, 255);
|
||||
return colors::FromRGBA8(0, 128, 255, 255);
|
||||
}
|
||||
rgba_t to_return{ 0.0f, 0.0f, 0.0f, 1.0f };
|
||||
|
||||
|
@ -29,7 +29,7 @@ void EmptyBacktrackData(BacktrackData &i);
|
||||
std::pair<int, int> getBestEntBestTick();
|
||||
bool shouldBacktrack();
|
||||
|
||||
BacktrackData headPositions[32][66]{};
|
||||
BacktrackData headPositions[33][66]{};
|
||||
int lastincomingsequencenumber = 0;
|
||||
bool isBacktrackEnabled = false;
|
||||
bool Vischeck_Success = false;
|
||||
@ -73,7 +73,7 @@ void AddLatencyToNetchan(INetChannel *ch)
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
for (int i = 0; i < 33; i++)
|
||||
for (int j = 0; j < 66; j++)
|
||||
headPositions[i][j] = {};
|
||||
|
||||
|
@ -1117,10 +1117,7 @@ void _FASTCALL ProcessEntity(CachedEntity *ent)
|
||||
// Health esp
|
||||
if ((int) show_health == 1 || (int) show_health == 3)
|
||||
{
|
||||
if (RAW_ENT(ent)->IsDormant())
|
||||
AddEntityString(ent, "?/? HP", colors::black);
|
||||
else
|
||||
AddEntityString(ent, format(ent->m_iHealth(), '/', ent->m_iMaxHealth(), " HP"), colors::Health(ent->m_iHealth(), ent->m_iMaxHealth()));
|
||||
AddEntityString(ent, format(ent->m_iHealth(), '/', ent->m_iMaxHealth(), " HP"), colors::Health(ent->m_iHealth(), ent->m_iMaxHealth()));
|
||||
}
|
||||
IF_GAME(IsTF())
|
||||
{
|
||||
|
@ -429,7 +429,7 @@ void Schema_Reload()
|
||||
static auto GetItemSchema = reinterpret_cast<void *(*) (void)>(gSignatures.GetClientSignature("55 89 E5 57 56 53 83 EC ? 8B 1D ? ? ? ? 85 DB 89 D8"));
|
||||
|
||||
static auto BInitTextBuffer = reinterpret_cast<bool (*)(void *, CUtlBuffer &, int)>(gSignatures.GetClientSignature("55 89 E5 57 56 53 8D 9D ? ? ? ? 81 EC ? ? ? ? 8B 7D ? 89 1C 24 "));
|
||||
void *schema = GetItemSchema() + 0x4;
|
||||
void *schema = (void *) ((unsigned) GetItemSchema() + 0x4);
|
||||
|
||||
FILE *file = fopen("/opt/cathook/data/items_game.txt", "r");
|
||||
if (!file || ferror(file) != 0)
|
||||
|
Reference in New Issue
Block a user