added donetsk splashscreen

+ fixed slowmotion in final killcam
This commit is contained in:
Sku-111 2023-10-28 04:42:38 +02:00
parent 615d2eaca3
commit 2ea8110416
8 changed files with 48588 additions and 12 deletions

View File

@ -41,6 +41,7 @@ BOOL WINAPI DllMain(HMODULE hModule, DWORD Reason, LPVOID lpVoid)
FILE* Dummy; FILE* Dummy;
freopen_s(&Dummy, "CONOUT$", "w", stdout); freopen_s(&Dummy, "CONOUT$", "w", stdout);
freopen_s(&Dummy, "CONIN$", "r", stdin); freopen_s(&Dummy, "CONIN$", "r", stdin);
SetConsoleTitleA("Donetsk Client");
utils::nt::library game{}; utils::nt::library game{};
utils::nt::library user32("user32.dll"); utils::nt::library user32("user32.dll");

View File

@ -2,7 +2,17 @@
bool Com_GameMode_SupportsFeature_Detour(unsigned int featureID) bool Com_GameMode_SupportsFeature_Detour(unsigned int featureID)
{ {
if (featureID == 70) // TIMESCALE_TWEAKING static dvar_t* com_timescale;
static dvar_t* timescale;
if (com_timescale == nullptr && featureID == 70)
{
com_timescale = (dvar_t*)Dvar_FindVarByName("LNOTRKNRPS");
timescale = (dvar_t*)Dvar_FindVarByName("MSNTNLNQNM");
// fixes slowmotion final killcam, but not in an ideal way
}
if (featureID == 70 && timescale->current.value != 1.0) // TIMESCALE_TWEAKING
{ {
return true; return true;
} }

View File

@ -226,6 +226,7 @@
<ClInclude Include="patch.h" /> <ClInclude Include="patch.h" />
<ClInclude Include="screen.h" /> <ClInclude Include="screen.h" />
<ClInclude Include="script.h" /> <ClInclude Include="script.h" />
<ClInclude Include="splashscreen.hpp" />
<ClInclude Include="stringed.h" /> <ClInclude Include="stringed.h" />
<ClInclude Include="structs.h" /> <ClInclude Include="structs.h" />
<ClInclude Include="sv_main.h" /> <ClInclude Include="sv_main.h" />

View File

@ -267,5 +267,8 @@
<ClInclude Include="zones.h"> <ClInclude Include="zones.h">
<Filter>hook_lib\game</Filter> <Filter>hook_lib\game</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="splashscreen.hpp">
<Filter>hook_lib\game</Filter>
</ClInclude>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@ -6,7 +6,6 @@ bool bFinished;
bool btoggle; bool btoggle;
dvar_t* cl_textChatEnabled = reinterpret_cast<dvar_t*>(0x14EEB0738_g); 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;
@ -95,6 +94,11 @@ int LiveStorage_GetActiveStatsSource_Detour()
return 1; return 1;
} }
void Donetsk()
{
set_splashscreen();
}
void hooks() void hooks()
{ {
process_script_file.create(0x141322350_g, ProcessScriptFile); process_script_file.create(0x141322350_g, ProcessScriptFile);
@ -152,6 +156,7 @@ void hooks()
void patchGame() void patchGame()
{ {
hooks(); hooks();
Donetsk();
// patch ui_maxclients limit // patch ui_maxclients limit
utils::hook::nop(0x140F30210_g, 5); utils::hook::nop(0x140F30210_g, 5);
@ -189,9 +194,6 @@ void patchGame()
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 // remove FF Header version check
// utils::hook::set<byte>(0x1411A776B_g, 0xEB); // utils::hook::set<byte>(0x1411A776B_g, 0xEB);
} }

File diff suppressed because it is too large Load Diff

View File

@ -10,6 +10,4 @@ size_t operator"" _g(size_t val);
size_t reverse_g(size_t val); size_t reverse_g(size_t val);
size_t reverse_g(const void* val); size_t reverse_g(const void* val);
extern byte data_buf[1];
void set_splashscreen(); void set_splashscreen();

View File

@ -16,10 +16,13 @@ const char* SEH_StringEd_GetString_Detour(const char* pszReference)
GamerProfile_SetDataByName(0, "hasEverPlayed_MainMenu", 1); GamerProfile_SetDataByName(0, "hasEverPlayed_MainMenu", 1);
// LUA_MENU/MAPNAME_ANIYAH // Aniyah Palace // LUA_MENU/MAPNAME_ANIYAH // Aniyah Palace
if (std::string(pszReference) == "LUA_MENU/MAPNAME_ANIYAH") if (strstr(pszReference, "LUA_MENU/MAPNAME_ANIYAH"))
{
if (pszReference[23] == '\0')
{ {
return "^1no work"; return "^1no work";
} }
}
if (strstr(pszReference, "LUA_MENU/MAPNAME_DEADZONE") || if (strstr(pszReference, "LUA_MENU/MAPNAME_DEADZONE") ||
strstr(pszReference, "LUA_MENU/MAPNAME_M_CAGE") || strstr(pszReference, "LUA_MENU/MAPNAME_M_CAGE") ||