完全搞定除了皮肤

This commit is contained in:
Huoji's
2023-10-06 05:08:40 +08:00
parent 40fc60e481
commit 9232d1c390
30 changed files with 3076 additions and 852 deletions

View File

@@ -1,17 +1,17 @@
#include "hooks.h"
extern auto GetGameGlobals() -> CGlobalVars*;
namespace hooks {
// "player_connect"
VMTHook* VMT_IServerGameClient;
VMTHook* VMT_INetworkServerServiceInteFace;
VMTHook* VMT_ISource2ServerInterFace;
FireEventServerSide_t original_FireEventServerSide = NULL;
OnClientConnect_t original_OnClientConnected = NULL;
OnClientDisconnect_t original_OnClientDisconnect = NULL;
Host_Say_t original_Host_Say = NULL;
StartupServer_t origin_StartServer = NULL;
GameFrame_t origin_GameFrame = NULL;
namespace hooks {
// "player_connect"
VMTHook* VMT_IServerGameClient;
VMTHook* VMT_INetworkServerServiceInteFace;
VMTHook* VMT_ISource2ServerInterFace;
void __fastcall hook_GameFrame(void* rcx, bool simulating, bool bFirstTick,
bool bLastTick) {
/**
@@ -128,11 +128,16 @@ bool __fastcall hook_FireEventServerSide(CGameEventManager* rcx,
static constexpr auto player_death =
hash_32_fnv1a_const("player_death");
static constexpr auto player_chat = hash_32_fnv1a_const("player_chat");
static constexpr auto player_spawn =
hash_32_fnv1a_const("player_spawn");
switch (hash_32_fnv1a_const(eventName)) {
case player_death:
events::OnPlayerDeathEvent(event);
break;
case player_spawn:
events::OnPlayerSpawnEvent(event);
break;
// V<><56>bug,<2C><EFBFBD><E2B2BB><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
/*
case player_chat: