Fix random menu crashes
This commit is contained in:
parent
915365bb49
commit
03fa2aad09
@ -7,7 +7,4 @@
|
||||
|
||||
namespace options
|
||||
{
|
||||
|
||||
|
||||
|
||||
}
|
1
include/hacks/Achievement.hpp
Executable file → Normal file
1
include/hacks/Achievement.hpp
Executable file → Normal file
@ -12,5 +12,4 @@ namespace hacks::tf2::achievement
|
||||
|
||||
void Lock();
|
||||
void Unlock();
|
||||
|
||||
}
|
||||
|
12
include/prediction.hpp
Executable file → Normal file
12
include/prediction.hpp
Executable file → Normal file
@ -1,9 +1,9 @@
|
||||
/*
|
||||
* prediction.h
|
||||
*
|
||||
* Created on: Dec 5, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
/*
|
||||
*prediction.h
|
||||
*
|
||||
* Created on: Dec 5, 2016
|
||||
* Author: nullifiedcat
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -14,5 +14,4 @@ extern SDL_Window *window;
|
||||
|
||||
void applySdlHooks();
|
||||
void cleanSdlHooks();
|
||||
|
||||
}
|
@ -28,7 +28,6 @@ CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
||||
"Crash servers by spamming signon net messages");
|
||||
bool *bSendPackets;
|
||||
|
||||
|
||||
CatVar crypt_chat(
|
||||
CV_SWITCH, "chat_crypto", "1", "Crypto chat",
|
||||
"Start message with !! and it will be only visible to cathook users");
|
||||
|
@ -5,4 +5,3 @@
|
||||
|
||||
#include "Options.hpp"
|
||||
#include "core/cvwrapper.hpp"
|
||||
|
||||
|
@ -329,7 +329,8 @@ free(logname);*/
|
||||
|
||||
hooks::panel.Set(g_IPanel);
|
||||
hooks::panel.HookMethod(hooked_methods::methods::PaintTraverse,
|
||||
offsets::PaintTraverse(), &hooked_methods::original::PaintTraverse);
|
||||
offsets::PaintTraverse(),
|
||||
&hooked_methods::original::PaintTraverse);
|
||||
hooks::panel.Apply();
|
||||
#endif
|
||||
|
||||
|
@ -111,5 +111,4 @@ CatCommand
|
||||
});
|
||||
CatCommand lock("achievement_lock", "Lock all achievements", Lock);
|
||||
CatCommand unlock("achievement_unlock", "Unlock all achievements", Unlock);
|
||||
|
||||
}
|
||||
|
1
src/hacks/AutoBackstab.cpp
Executable file → Normal file
1
src/hacks/AutoBackstab.cpp
Executable file → Normal file
@ -98,7 +98,6 @@ void CreateMove()
|
||||
g_pUserCmd->buttons |= IN_ATTACK;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -14,7 +14,6 @@
|
||||
|
||||
#include "HookedMethods.hpp"
|
||||
|
||||
|
||||
class CMoveData;
|
||||
namespace engine_prediction
|
||||
{
|
||||
@ -31,9 +30,9 @@ void RunEnginePrediction(IClientEntity *ent, CUserCmd *ucmd)
|
||||
|
||||
void **predictionVtable = *((void ***) g_IPrediction);
|
||||
SetupMoveFn oSetupMove =
|
||||
(SetupMoveFn) (*(unsigned *) (predictionVtable + 19));
|
||||
(SetupMoveFn)(*(unsigned *) (predictionVtable + 19));
|
||||
FinishMoveFn oFinishMove =
|
||||
(FinishMoveFn) (*(unsigned *) (predictionVtable + 20));
|
||||
(FinishMoveFn)(*(unsigned *) (predictionVtable + 20));
|
||||
|
||||
// CMoveData *pMoveData = (CMoveData*)(sharedobj::client->lmap->l_addr +
|
||||
// 0x1F69C0C); CMoveData movedata {};
|
||||
@ -503,7 +502,6 @@ DEFINE_HOOKED_METHOD(CreateMove, bool, void *this_, float input_sample_time,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*float o_curtime;
|
||||
float o_frametime;
|
||||
|
||||
|
@ -102,7 +102,6 @@ bool StolenName()
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
namespace hooked_methods
|
||||
{
|
||||
|
||||
|
@ -25,8 +25,7 @@ DEFINE_HOOKED_METHOD(GetUserCmd, CUserCmd *, IInput *this_, int sequence_number)
|
||||
oldcmd = def->command_number;
|
||||
def->command_number = command_number_mod[def->command_number];
|
||||
def->random_seed =
|
||||
MD5_PseudoRandom(unsigned(def->command_number)) &
|
||||
0x7fffffff;
|
||||
MD5_PseudoRandom(unsigned(def->command_number)) & 0x7fffffff;
|
||||
command_number_mod.erase(command_number_mod.find(oldcmd));
|
||||
*(int *) ((unsigned) g_IBaseClientState +
|
||||
offsets::lastoutgoingcommand()) = def->command_number - 1;
|
||||
|
@ -6,8 +6,6 @@
|
||||
#include <hacks/hacklist.hpp>
|
||||
#include "HookedMethods.hpp"
|
||||
|
||||
|
||||
|
||||
const char *skynum[] = { "sky_tf2_04",
|
||||
"sky_upward",
|
||||
"sky_dustbowl_01",
|
||||
|
@ -10,7 +10,6 @@
|
||||
static CatVar newlines_msg(CV_INT, "chat_newlines", "0", "Prefix newlines",
|
||||
"Add # newlines before each your message", 0, 24);
|
||||
|
||||
|
||||
static CatVar log_sent(CV_SWITCH, "debug_log_sent_messages", "0",
|
||||
"Log sent messages");
|
||||
static CatVar airstuck(CV_KEY, "airstuck", "0", "Airstuck", "");
|
||||
@ -56,7 +55,8 @@ DEFINE_HOOKED_METHOD(SendNetMsg, bool, INetChannel *this_, INetMessage &msg,
|
||||
str = str.substr(16, str.length() - 17);
|
||||
// if (queue_messages && !chat_stack::CanSend()) {
|
||||
stringcmd.m_szCommand = str.c_str();
|
||||
return original::SendNetMsg(this_, stringcmd, force_reliable, voice);
|
||||
return original::SendNetMsg(this_, stringcmd, force_reliable,
|
||||
voice);
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
@ -31,11 +31,8 @@
|
||||
*(float *) ((uintptr_t) _this + 79u) = old_invis;
|
||||
}*/
|
||||
|
||||
|
||||
float last_say = 0.0f;
|
||||
|
||||
|
||||
|
||||
CatCommand spectate("spectate", "Spectate", [](const CCommand &args) {
|
||||
if (args.ArgC() < 1)
|
||||
{
|
||||
@ -53,7 +50,6 @@ CatCommand spectate("spectate", "Spectate", [](const CCommand &args) {
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
static CatCommand plus_use_action_slot_item_server(
|
||||
"+cat_use_action_slot_item_server", "use_action_slot_item_server", []() {
|
||||
KeyValues *kv = new KeyValues("+use_action_slot_item_server");
|
||||
@ -76,9 +72,3 @@ static CatCommand minus_use_action_slot_item_server(
|
||||
|
||||
static CatVar server_crash_key(CV_KEY, "crash_server", "0", "Server crash key",
|
||||
"hold key and wait...");
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
@ -12,10 +12,11 @@ static bool init{ false };
|
||||
static bool init_wminfo{ false };
|
||||
static SDL_SysWMinfo wminfo{};
|
||||
|
||||
int static_init_wminfo = (wminfo.version.major = 2, wminfo.version.minor = 0, 1);
|
||||
int static_init_wminfo =
|
||||
(wminfo.version.major = 2, wminfo.version.minor = 0, 1);
|
||||
|
||||
typedef SDL_bool (*SDL_GetWindowWMInfo_t)(SDL_Window * window,
|
||||
SDL_SysWMinfo * info);
|
||||
typedef SDL_bool (*SDL_GetWindowWMInfo_t)(SDL_Window *window,
|
||||
SDL_SysWMinfo *info);
|
||||
static SDL_GetWindowWMInfo_t GetWindowWMInfo = nullptr;
|
||||
static SDL_GLContext tf2_sdl = nullptr;
|
||||
|
||||
|
@ -16,10 +16,11 @@ namespace pointers
|
||||
hooked_methods::types::SDL_GL_SwapWindow *SDL_GL_SwapWindow{ nullptr };
|
||||
}
|
||||
|
||||
|
||||
void applySdlHooks()
|
||||
{
|
||||
pointers::SDL_GL_SwapWindow = reinterpret_cast<hooked_methods::types::SDL_GL_SwapWindow *>(sharedobj::libsdl().Pointer(0xFD648));
|
||||
pointers::SDL_GL_SwapWindow =
|
||||
reinterpret_cast<hooked_methods::types::SDL_GL_SwapWindow *>(
|
||||
sharedobj::libsdl().Pointer(0xFD648));
|
||||
|
||||
hooked_methods::original::SDL_GL_SwapWindow = *pointers::SDL_GL_SwapWindow;
|
||||
*pointers::SDL_GL_SwapWindow = hooked_methods::methods::SDL_GL_SwapWindow;
|
||||
@ -29,5 +30,4 @@ void cleanSdlHooks()
|
||||
{
|
||||
*pointers::SDL_GL_SwapWindow = hooked_methods::original::SDL_GL_SwapWindow;
|
||||
}
|
||||
|
||||
}
|
1
src/visual/drawex.cpp
Executable file → Normal file
1
src/visual/drawex.cpp
Executable file → Normal file
@ -156,6 +156,7 @@ void get_string_size(const char *string, font_handle_t &font, float *x,
|
||||
|
||||
void draw_begin()
|
||||
{
|
||||
glColor3f(1, 1, 1);
|
||||
PROF_SECTION(DRAWEX_draw_begin);
|
||||
#if EXTERNAL_DRAWING
|
||||
xoverlay_draw_begin();
|
||||
|
@ -25,6 +25,7 @@ void ItemVariable::Update()
|
||||
Item::Update();
|
||||
if (catvar.name.c_str())
|
||||
if (catvar.registered == true)
|
||||
if (catvar.desc_long.c_str())
|
||||
if (!catvar.desc_long.empty())
|
||||
if (catvar.desc_long.length() && IsHovered() &&
|
||||
catvar.desc_long != "no description")
|
||||
|
Reference in New Issue
Block a user