a file for each hook?
This commit is contained in:
parent
3e35c859f2
commit
328a6fbdd0
@ -53,7 +53,8 @@ target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/velocity.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/vfunc.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/votelogger.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/xorstring.hpp")
|
||||
"${CMAKE_CURRENT_LIST_DIR}/xorstring.hpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MiscTemporary.hpp")
|
||||
|
||||
target_include_directories(cathook PRIVATE "${CMAKE_CURRENT_LIST_DIR}")
|
||||
|
||||
|
24
include/MiscTemporary.hpp
Normal file
24
include/MiscTemporary.hpp
Normal file
@ -0,0 +1,24 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
// This is a temporary file to put code that needs moving/refactoring in.
|
||||
|
||||
extern bool *bSendPackets;
|
||||
extern CatVar no_zoom;
|
||||
extern CatVar clean_screenshots;
|
||||
extern CatVar disable_visuals;
|
||||
extern CatVar disconnect_reason;
|
||||
#if ENABLE_VISUALS
|
||||
extern int spectator_target;
|
||||
#endif
|
||||
|
||||
extern SDL_Window *sdl_current_window;
|
||||
|
||||
void DoSDLHooking();
|
||||
void DoSDLUnhooking();
|
@ -9,17 +9,9 @@
|
||||
|
||||
#include "common.hpp"
|
||||
|
||||
extern bool *bSendPackets;
|
||||
extern CatVar no_zoom;
|
||||
extern CatVar clean_screenshots;
|
||||
extern CatVar disable_visuals;
|
||||
extern CatVar disconnect_reason;
|
||||
#if ENABLE_VISUALS
|
||||
extern int spectator_target;
|
||||
#endif
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
union SDL_Event;
|
||||
struct SDL_Window;
|
||||
#endif
|
||||
|
||||
namespace hooked_methods
|
||||
@ -42,10 +34,6 @@ using GetUserCmd = CUserCmd *(*)(IInput *, int);
|
||||
using SendNetMsg = bool(*)(INetChannel *, INetMessage &, bool, bool);
|
||||
using CanPacket = bool(*)(INetChannel *);
|
||||
using Shutdown = void(*)(INetChannel *, const char *);
|
||||
// CBaseClientState
|
||||
using GetClientName = const char *(*)(CBaseClientState *);
|
||||
using ProcessSetConVar = bool(*)(CBaseClientState *, NET_SetConVar *);
|
||||
using ProcessGetCvarValue = bool(*)(CBaseClientState *, SVC_GetCvarValue *);
|
||||
// ISteamFriends
|
||||
using GetFriendPersonaName = const char *(*)(ISteamFriends *, CSteamID);
|
||||
// IEngineVGui
|
||||
@ -88,10 +76,6 @@ CUserCmd *GetUserCmd(IInput *, int);
|
||||
bool SendNetMsg(INetChannel *, INetMessage &, bool, bool);
|
||||
bool CanPacket(INetChannel *);
|
||||
void Shutdown(INetChannel *, const char *);
|
||||
// CBaseClientState
|
||||
const char *GetClientName(CBaseClientState *_this);
|
||||
bool ProcessSetConVar(CBaseClientState *_this, NET_SetConVar *msg);
|
||||
bool ProcessGetCvarValue(CBaseClientState *_this, SVC_GetCvarValue *msg);
|
||||
// ISteamFriends
|
||||
const char *GetFriendPersonaName(ISteamFriends *_this, CSteamID steamID);
|
||||
// IEngineVGui
|
||||
@ -120,20 +104,6 @@ int RandomInt(void *, int, int);
|
||||
|
||||
}
|
||||
|
||||
#if ENABLE_VISUALS
|
||||
|
||||
/* SDL HOOKS */
|
||||
union SDL_Event;
|
||||
class SDL_Window;
|
||||
|
||||
extern SDL_Window *sdl_current_window;
|
||||
|
||||
|
||||
|
||||
void DoSDLHooking();
|
||||
void DoSDLUnhooking();
|
||||
#endif
|
||||
|
||||
|
||||
// TODO
|
||||
// wontfix.club
|
||||
|
@ -39,7 +39,8 @@ target_sources(cathook PRIVATE
|
||||
"${CMAKE_CURRENT_LIST_DIR}/trace.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/ucccccp_cmds.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/velocity.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/votelogger.cpp")
|
||||
"${CMAKE_CURRENT_LIST_DIR}/votelogger.cpp"
|
||||
"${CMAKE_CURRENT_LIST_DIR}/MiscTemporary.cpp")
|
||||
|
||||
add_subdirectory(classinfo)
|
||||
add_subdirectory(copypasted)
|
||||
|
30
src/MiscTemporary.cpp
Normal file
30
src/MiscTemporary.cpp
Normal file
@ -0,0 +1,30 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "MiscTemporary.hpp"
|
||||
|
||||
CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
||||
"Allows jumping while shooting with minigun");
|
||||
|
||||
CatVar jointeam(CV_SWITCH, "fb_autoteam", "1",
|
||||
"Joins player team automatically (NYI)");
|
||||
CatVar joinclass(CV_STRING, "fb_autoclass", "spy",
|
||||
"Class that will be picked after joining a team (NYI)");
|
||||
|
||||
CatVar nolerp(CV_SWITCH, "nolerp", "0", "NoLerp mode (experimental)");
|
||||
|
||||
CatVar engine_pred(CV_SWITCH, "engine_prediction", "0",
|
||||
"Engine Prediction");
|
||||
CatVar debug_projectiles(CV_SWITCH, "debug_projectiles", "0",
|
||||
"Debug Projectiles");
|
||||
|
||||
CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
|
||||
CatVar serverlag_amount(
|
||||
CV_INT, "serverlag", "0", "serverlag",
|
||||
"Lag the server by spamming this many voicecommands per tick");
|
||||
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
||||
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
||||
"Crash servers by spamming signon net messages");
|
||||
bool *bSendPackets;
|
6
src/hooks/CanPacket.cpp
Normal file
6
src/hooks/CanPacket.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
@ -10,16 +10,6 @@
|
||||
|
||||
#include <link.h>
|
||||
|
||||
static CatVar minigun_jump(CV_SWITCH, "minigun_jump", "0", "TF2C minigun jump",
|
||||
"Allows jumping while shooting with minigun");
|
||||
|
||||
CatVar jointeam(CV_SWITCH, "fb_autoteam", "1",
|
||||
"Joins player team automatically (NYI)");
|
||||
CatVar joinclass(CV_STRING, "fb_autoclass", "spy",
|
||||
"Class that will be picked after joining a team (NYI)");
|
||||
|
||||
CatVar nolerp(CV_SWITCH, "nolerp", "0", "NoLerp mode (experimental)");
|
||||
|
||||
class CMoveData;
|
||||
namespace engine_prediction
|
||||
{
|
||||
@ -105,19 +95,7 @@ void End() {
|
||||
}*/
|
||||
}
|
||||
|
||||
static CatVar engine_pred(CV_SWITCH, "engine_prediction", "0",
|
||||
"Engine Prediction");
|
||||
static CatVar debug_projectiles(CV_SWITCH, "debug_projectiles", "0",
|
||||
"Debug Projectiles");
|
||||
|
||||
static CatVar fakelag_amount(CV_INT, "fakelag", "0", "Bad Fakelag");
|
||||
static CatVar serverlag_amount(
|
||||
CV_INT, "serverlag", "0", "serverlag",
|
||||
"Lag the server by spamming this many voicecommands per tick");
|
||||
CatVar semiauto(CV_INT, "semiauto", "0", "Semiauto");
|
||||
CatVar servercrash(CV_SWITCH, "servercrash", "0", "crash servers",
|
||||
"Crash servers by spamming signon net messages");
|
||||
bool *bSendPackets;
|
||||
bool CreateMove_hook(void *thisptr, float inputSample, CUserCmd *cmd)
|
||||
{
|
||||
uintptr_t **fp;
|
||||
|
6
src/hooks/DispatchUserMessage.cpp
Normal file
6
src/hooks/DispatchUserMessage.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/FireGameEvent.cpp
Normal file
6
src/hooks/FireGameEvent.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/GetFriendPersonaName.cpp
Normal file
6
src/hooks/GetFriendPersonaName.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/GetUserCmd.cpp
Normal file
6
src/hooks/GetUserCmd.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/IN_KeyEvent.cpp
Normal file
6
src/hooks/IN_KeyEvent.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/LevelInit.cpp
Normal file
6
src/hooks/LevelInit.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/LevelShutdown.cpp
Normal file
6
src/hooks/LevelShutdown.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/SendNetMsg.cpp
Normal file
6
src/hooks/SendNetMsg.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/Shutdown.cpp
Normal file
6
src/hooks/Shutdown.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/BeginFrame.cpp
Normal file
6
src/hooks/visual/BeginFrame.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/DrawModelExecute.cpp
Normal file
6
src/hooks/visual/DrawModelExecute.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/FrameStageNotify.cpp
Normal file
6
src/hooks/visual/FrameStageNotify.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/OverrideView.cpp
Normal file
6
src/hooks/visual/OverrideView.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/PaintTraverse.cpp
Normal file
6
src/hooks/visual/PaintTraverse.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/RandomInt.cpp
Normal file
6
src/hooks/visual/RandomInt.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/SDL_GL_SwapWindow.cpp
Normal file
6
src/hooks/visual/SDL_GL_SwapWindow.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
6
src/hooks/visual/SDL_PollEvent.cpp
Normal file
6
src/hooks/visual/SDL_PollEvent.cpp
Normal file
@ -0,0 +1,6 @@
|
||||
/*
|
||||
Created by Jenny White on 29.04.18.
|
||||
Copyright (c) 2018 nullworks. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "HookedMethods.hpp"
|
BIN
src/menu.tar.xz
BIN
src/menu.tar.xz
Binary file not shown.
Reference in New Issue
Block a user