Zonebuilder directory for support zones (#662)
Co-authored-by: Louvenarde <louve@louve.systems> Co-authored-by: Diavolo <edoardo.sanguineti222@gmail.com>
This commit is contained in:
@ -119,12 +119,6 @@ namespace Components
|
||||
static void HideModel();
|
||||
static void HideModelStub();
|
||||
|
||||
static Game::dvar_t* GetDistortionDvar();
|
||||
static void SetDistortionStub();
|
||||
|
||||
static Game::dvar_t* GetSpecularDvar();
|
||||
static void SetSpecularStub1();
|
||||
static void SetSpecularStub2();
|
||||
static void G_SpawnTurretHook(Game::gentity_s* ent, int unk, int unk2);
|
||||
static bool SV_SetTriggerModelHook(Game::gentity_s* ent);
|
||||
static int16 CM_TriggerModelBounds(int brushModelPointer, Game::Bounds* bounds);
|
||||
|
@ -255,7 +255,7 @@ namespace Components
|
||||
true, Game::DVAR_CODINFO, "Push intersecting players away from each other");
|
||||
|
||||
BGClimbAnything = Dvar::Register<bool>("bg_climbAnything",
|
||||
false, Game::DVAR_CODINFO, "Allows to treat any surface as a ladder");
|
||||
false, Game::DVAR_CODINFO, "Treat any surface as a ladder");
|
||||
}
|
||||
|
||||
PlayerMovement::PlayerMovement()
|
||||
|
@ -1022,6 +1022,18 @@ namespace Components
|
||||
sound->info.data_ptr = allocatedSpace;
|
||||
}
|
||||
|
||||
Game::Sys_File ZoneBuilder::Sys_CreateFile_Stub(const char* dir, const char* filename)
|
||||
{
|
||||
auto file = Game::Sys_CreateFile(dir, filename);
|
||||
|
||||
if (file.handle == INVALID_HANDLE_VALUE)
|
||||
{
|
||||
file = Game::Sys_CreateFile("zone\\zonebuilder\\", filename);
|
||||
}
|
||||
|
||||
return file;
|
||||
}
|
||||
|
||||
ZoneBuilder::ZoneBuilder()
|
||||
{
|
||||
// ReSharper disable CppStaticAssertFailure
|
||||
@ -1034,6 +1046,8 @@ namespace Components
|
||||
// Prevent loading textures (preserves loaddef)
|
||||
//Utils::Hook::Set<BYTE>(Game::Load_Texture, 0xC3);
|
||||
|
||||
Utils::Hook(0x5BC832, Sys_CreateFile_Stub, HOOK_CALL).install()->quick();
|
||||
|
||||
// Store the loaddef
|
||||
Utils::Hook(Game::Load_Texture, StoreTexture, HOOK_JUMP).install()->quick();
|
||||
|
||||
|
@ -148,6 +148,7 @@ namespace Components
|
||||
static void ResetThreadRole();
|
||||
|
||||
static bool IsThreadMainThreadHook();
|
||||
static Game::Sys_File Sys_CreateFile_Stub(const char* dir, const char* filename);
|
||||
|
||||
static void Com_Quitf_t();
|
||||
|
||||
|
Reference in New Issue
Block a user