commit
e8343276d9
@ -52,8 +52,11 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD Reason, LPVOID lpVoid)
|
|||||||
printf("Base Address: %p\n", base);
|
printf("Base Address: %p\n", base);
|
||||||
|
|
||||||
addCustomDvars();
|
addCustomDvars();
|
||||||
|
addCustomCmds();
|
||||||
patchGame();
|
patchGame();
|
||||||
|
|
||||||
|
printf("Discord: discord.gg/donetsk\n");
|
||||||
|
|
||||||
cmd_args = (CmdArgs*)(0x14D20CBD0_g);
|
cmd_args = (CmdArgs*)(0x14D20CBD0_g);
|
||||||
|
|
||||||
clientUIActives = (clientUIActive_t*)(0x14EEF1280_g);
|
clientUIActives = (clientUIActive_t*)(0x14EEF1280_g);
|
||||||
|
@ -3,22 +3,7 @@
|
|||||||
|
|
||||||
void addCustomDvars()
|
void addCustomDvars()
|
||||||
{
|
{
|
||||||
Cmd_AddCommandInternal("set_byte", set_byte_f, &set_byte_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("set_short", set_short_f, &set_short_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("set_int", set_int_f, &set_int_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("set_float", set_float_f, &set_float_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("set_pointer", set_pointer_f, &set_pointer_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("quit", Cmd_Quit_f, &quit_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("openmenu", Cmd_OpenMenu_f, &openmenu_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("addbot", Cmd_AddBot_f, &addbot_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("ddldump", Cmd_DDLDump_f, &ddldump_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("weapondefdump", Cmd_WeaponDefDump_f, &weapondefdump_f_VAR);
|
|
||||||
//Cmd_AddCommandInternal("view_vehicle_ents", Cmd_ViewVehicleEnts_f, &view_vehicle_ents_f_VAR);
|
|
||||||
// Cmd_AddCommandInternal("save_inventory", Cmd_LoadoutSave_f, &loadout_save_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("map_restart", SV_CmdsMP_MapRestart_f, &MapRestart_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("fast_restart", SV_CmdsMP_FastRestart_f, &FastRestart_f_VAR);
|
|
||||||
Cmd_AddCommandInternal("setOmnvar", Cmd_Omnvar_Set_f, &omnvar_set_f_VAR);
|
|
||||||
// Cmd_AddCommandInternal("dumpomnvars", Cmd_Omnvars_Dump_f, &omnvar_dump_f_VAR);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dvar_t* Dvar_RegisterBool_Detour(const char* dvarName, bool value, unsigned int flags, const char* description)
|
dvar_t* Dvar_RegisterBool_Detour(const char* dvarName, bool value, unsigned int flags, const char* description)
|
||||||
@ -44,4 +29,5 @@ dvar_t* Dvar_FindVarByName_Detour(const char* dvarName)
|
|||||||
{
|
{
|
||||||
dvar_t* ret = dvar_findvarbyname.stub<dvar_t*>(dvarName);
|
dvar_t* ret = dvar_findvarbyname.stub<dvar_t*>(dvarName);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,4 +16,9 @@ int DB_PollFastfileState_Detour(const char* zoneName)
|
|||||||
//printf("%s\n", zoneName);
|
//printf("%s\n", zoneName);
|
||||||
|
|
||||||
return db_pollfastfilestate.stub<int>(zoneName);
|
return db_pollfastfilestate.stub<int>(zoneName);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool DB_CheckXFileVersion_Detour()
|
||||||
|
{
|
||||||
|
return true;
|
||||||
}
|
}
|
@ -5,4 +5,7 @@ inline utils::hook::detour db_loadxfile;
|
|||||||
int DB_LoadXFile_Detour(const char* zoneName, uintptr_t zoneMem, uintptr_t assetList, int zoneFlags, bool wasPaused, int failureMode, uintptr_t outSignature);
|
int DB_LoadXFile_Detour(const char* zoneName, uintptr_t zoneMem, uintptr_t assetList, int zoneFlags, bool wasPaused, int failureMode, uintptr_t outSignature);
|
||||||
|
|
||||||
inline utils::hook::detour db_pollfastfilestate;
|
inline utils::hook::detour db_pollfastfilestate;
|
||||||
int DB_PollFastfileState_Detour(const char* zoneName);
|
int DB_PollFastfileState_Detour(const char* zoneName);
|
||||||
|
|
||||||
|
inline utils::hook::detour db_checkxfileversion;
|
||||||
|
bool DB_CheckXFileVersion_Detour();
|
@ -511,6 +511,7 @@ cmd_function_s FastRestart_f_VAR;
|
|||||||
cmd_function_s MapRestart_f_VAR;
|
cmd_function_s MapRestart_f_VAR;
|
||||||
cmd_function_s omnvar_set_f_VAR;
|
cmd_function_s omnvar_set_f_VAR;
|
||||||
cmd_function_s omnvar_dump_f_VAR;
|
cmd_function_s omnvar_dump_f_VAR;
|
||||||
|
cmd_function_s unlockall_f_VAR;
|
||||||
|
|
||||||
CmdArgs* cmd_args;
|
CmdArgs* cmd_args;
|
||||||
|
|
||||||
|
@ -130,6 +130,7 @@ extern cmd_function_s FastRestart_f_VAR;
|
|||||||
extern cmd_function_s MapRestart_f_VAR;
|
extern cmd_function_s MapRestart_f_VAR;
|
||||||
extern cmd_function_s omnvar_set_f_VAR;
|
extern cmd_function_s omnvar_set_f_VAR;
|
||||||
extern cmd_function_s omnvar_dump_f_VAR;
|
extern cmd_function_s omnvar_dump_f_VAR;
|
||||||
|
extern cmd_function_s unlockall_f_VAR;
|
||||||
extern CmdArgs* cmd_args;
|
extern CmdArgs* cmd_args;
|
||||||
|
|
||||||
void* RtlAddVectoredExceptionHandler(LONG First, PVECTORED_EXCEPTION_HANDLER Handler);
|
void* RtlAddVectoredExceptionHandler(LONG First, PVECTORED_EXCEPTION_HANDLER Handler);
|
||||||
|
@ -1,6 +1,27 @@
|
|||||||
#include "g_cmds.h"
|
#include "g_cmds.h"
|
||||||
#include "game_inc.h"
|
#include "game_inc.h"
|
||||||
|
|
||||||
|
void addCustomCmds()
|
||||||
|
{
|
||||||
|
Cmd_AddCommandInternal("set_byte", set_byte_f, &set_byte_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("set_short", set_short_f, &set_short_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("set_int", set_int_f, &set_int_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("set_float", set_float_f, &set_float_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("set_pointer", set_pointer_f, &set_pointer_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("quit", Cmd_Quit_f, &quit_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("openmenu", Cmd_OpenMenu_f, &openmenu_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("addbot", Cmd_AddBot_f, &addbot_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("ddldump", Cmd_DDLDump_f, &ddldump_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("weapondefdump", Cmd_WeaponDefDump_f, &weapondefdump_f_VAR);
|
||||||
|
//Cmd_AddCommandInternal("view_vehicle_ents", Cmd_ViewVehicleEnts_f, &view_vehicle_ents_f_VAR);
|
||||||
|
// Cmd_AddCommandInternal("save_inventory", Cmd_LoadoutSave_f, &loadout_save_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("map_restart", SV_CmdsMP_MapRestart_f, &MapRestart_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("fast_restart", SV_CmdsMP_FastRestart_f, &FastRestart_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("setOmnvar", Cmd_Omnvar_Set_f, &omnvar_set_f_VAR);
|
||||||
|
// Cmd_AddCommandInternal("dumpomnvars", Cmd_Omnvars_Dump_f, &omnvar_dump_f_VAR);
|
||||||
|
Cmd_AddCommandInternal("unlockAll", Cmd_UnlockAll_f, &unlockall_f_VAR);
|
||||||
|
}
|
||||||
|
|
||||||
void G_CmdsMP_ClientCommand_Detour(int clientNum)
|
void G_CmdsMP_ClientCommand_Detour(int clientNum)
|
||||||
{
|
{
|
||||||
g_entities = *reinterpret_cast<gentity_s**>(0x14BC20F00_g);
|
g_entities = *reinterpret_cast<gentity_s**>(0x14BC20F00_g);
|
||||||
@ -375,4 +396,9 @@ void Cmd_ViewVehicleEnts_f()
|
|||||||
void Cmd_LoadoutSave_f()
|
void Cmd_LoadoutSave_f()
|
||||||
{
|
{
|
||||||
SaveInventory();
|
SaveInventory();
|
||||||
|
}
|
||||||
|
|
||||||
|
void Cmd_UnlockAll_f()
|
||||||
|
{
|
||||||
|
Cbuf_AddText("seta unlockAllItems 1");
|
||||||
}
|
}
|
@ -1,6 +1,8 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
#include "Main.hpp"
|
#include "Main.hpp"
|
||||||
|
|
||||||
|
void addCustomCmds();
|
||||||
|
|
||||||
inline utils::hook::detour g_cmdsmp_clientcommand;
|
inline utils::hook::detour g_cmdsmp_clientcommand;
|
||||||
void G_CmdsMP_ClientCommand_Detour(int clientNum);
|
void G_CmdsMP_ClientCommand_Detour(int clientNum);
|
||||||
|
|
||||||
@ -30,4 +32,6 @@ void Cmd_WeaponDefDump_f();
|
|||||||
|
|
||||||
void Cmd_ViewVehicleEnts_f();
|
void Cmd_ViewVehicleEnts_f();
|
||||||
|
|
||||||
void Cmd_LoadoutSave_f();
|
void Cmd_LoadoutSave_f();
|
||||||
|
|
||||||
|
void Cmd_UnlockAll_f();
|
@ -8,4 +8,6 @@ void PartyHost_StartPrivateParty_Detour(int localClientNum, int localControllerI
|
|||||||
partyhost_startprivateparty.stub<void>(localClientNum, localControllerIndex, currentlyActive, hostType);
|
partyhost_startprivateparty.stub<void>(localClientNum, localControllerIndex, currentlyActive, hostType);
|
||||||
|
|
||||||
LoadInventory();
|
LoadInventory();
|
||||||
|
|
||||||
|
Cbuf_AddText("set cl_textChatEnabled 1");
|
||||||
}
|
}
|
@ -5,11 +5,15 @@ int iTick = 0;
|
|||||||
bool bFinished;
|
bool bFinished;
|
||||||
bool btoggle;
|
bool btoggle;
|
||||||
|
|
||||||
|
dvar_t* cl_textChatEnabled = reinterpret_cast<dvar_t*>(0x14EEB0738_g);
|
||||||
|
dvar_t* com_timescale = reinterpret_cast<dvar_t*>(0x14D3865E8_g);
|
||||||
|
|
||||||
uintptr_t xuid_generated;
|
uintptr_t xuid_generated;
|
||||||
int collision_ticker;
|
int collision_ticker;
|
||||||
void R_EndFrame_Detour()
|
void R_EndFrame_Detour()
|
||||||
{
|
{
|
||||||
if (strcmp(Dvar_GetStringSafe("NSQLTTMRMP"), "mp_donetsk") == 0) {
|
if (strcmp(Dvar_GetStringSafe("NSQLTTMRMP"), "mp_donetsk") == 0)
|
||||||
|
{
|
||||||
*reinterpret_cast<int*>(0x14E385A68_g) = 80;
|
*reinterpret_cast<int*>(0x14E385A68_g) = 80;
|
||||||
*reinterpret_cast<int*>(0x14E385A78_g) = 80;
|
*reinterpret_cast<int*>(0x14E385A78_g) = 80;
|
||||||
if (collision_ticker == 60) {
|
if (collision_ticker == 60) {
|
||||||
@ -140,6 +144,9 @@ void hooks()
|
|||||||
com_gamemode_supportsfeature.create(0x1410C8980_g, Com_GameMode_SupportsFeature_Detour);
|
com_gamemode_supportsfeature.create(0x1410C8980_g, Com_GameMode_SupportsFeature_Detour);
|
||||||
|
|
||||||
lui_cod_luacall_getblueprintdata_impl.create(0x140F58A00_g, LUI_CoD_LuaCall_GetBlueprintData_impl_Detour);
|
lui_cod_luacall_getblueprintdata_impl.create(0x140F58A00_g, LUI_CoD_LuaCall_GetBlueprintData_impl_Detour);
|
||||||
|
|
||||||
|
// remove FF Header version check
|
||||||
|
// db_checkxfileversion.create(0x1411A7840_g, DB_CheckXFileVersion_Detour);
|
||||||
}
|
}
|
||||||
|
|
||||||
void patchGame()
|
void patchGame()
|
||||||
@ -181,4 +188,10 @@ void patchGame()
|
|||||||
utils::hook::nop(0x14165E660_g, 5);
|
utils::hook::nop(0x14165E660_g, 5);
|
||||||
utils::hook::nop(0x141665289_g, 5);
|
utils::hook::nop(0x141665289_g, 5);
|
||||||
utils::hook::nop(0x14166567D_g, 5);
|
utils::hook::nop(0x14166567D_g, 5);
|
||||||
|
|
||||||
|
// set com_timescale dvar to read only
|
||||||
|
utils::hook::set<unsigned int>(0x1412B26CF_g, 8192);
|
||||||
|
|
||||||
|
// remove FF Header version check
|
||||||
|
// utils::hook::set<byte>(0x1411A776B_g, 0xEB);
|
||||||
}
|
}
|
@ -15,8 +15,13 @@ const char* SEH_StringEd_GetString_Detour(const char* pszReference)
|
|||||||
GamerProfile_SetDataByName(0, "acceptedEULA", 1);
|
GamerProfile_SetDataByName(0, "acceptedEULA", 1);
|
||||||
GamerProfile_SetDataByName(0, "hasEverPlayed_MainMenu", 1);
|
GamerProfile_SetDataByName(0, "hasEverPlayed_MainMenu", 1);
|
||||||
|
|
||||||
if (strstr(pszReference, "LUA_MENU/MAPNAME_ANIYAH") ||
|
// LUA_MENU/MAPNAME_ANIYAH // Aniyah Palace
|
||||||
strstr(pszReference, "LUA_MENU/MAPNAME_DEADZONE") ||
|
if (std::string(pszReference) == "LUA_MENU/MAPNAME_ANIYAH")
|
||||||
|
{
|
||||||
|
return "^1no work";
|
||||||
|
}
|
||||||
|
|
||||||
|
if (strstr(pszReference, "LUA_MENU/MAPNAME_DEADZONE") ||
|
||||||
strstr(pszReference, "LUA_MENU/MAPNAME_M_CAGE") ||
|
strstr(pszReference, "LUA_MENU/MAPNAME_M_CAGE") ||
|
||||||
strstr(pszReference, "LUA_MENU/MAPNAME_CAVE_AM") ||
|
strstr(pszReference, "LUA_MENU/MAPNAME_CAVE_AM") ||
|
||||||
strstr(pszReference, "LUA_MENU/MAPNAME_CAVE") ||
|
strstr(pszReference, "LUA_MENU/MAPNAME_CAVE") ||
|
||||||
|
Loading…
Reference in New Issue
Block a user