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:
parent
6692e99d86
commit
6958316fe4
@ -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();
|
||||
|
||||
|
@ -95,6 +95,71 @@ namespace Game
|
||||
ASSET_TYPE_INVALID = -1,
|
||||
};
|
||||
|
||||
enum GfxWarningType
|
||||
{
|
||||
R_WARN_FRONTEND_ENT_LIMIT = 0x0,
|
||||
R_WARN_KNOWN_MODELS = 0x1,
|
||||
R_WARN_KNOWN_PER_CLIENT_MODELS = 0x2,
|
||||
R_WARN_KNOWN_SPECIAL_MODELS = 0x3,
|
||||
R_WARN_MODEL_LIGHT_CACHE = 0x4,
|
||||
R_WARN_SCENE_ENTITIES = 0x5,
|
||||
R_WARN_TEMP_SKIN_BUF_SIZE = 0x6,
|
||||
R_WARN_MAX_SKINNED_CACHE_VERTICES = 0x7,
|
||||
R_WARN_MAX_SCENE_SURFS_SIZE = 0x8,
|
||||
R_WARN_MAX_SURF_BUF = 0x9,
|
||||
R_WARN_PORTAL_PLANES = 0xA,
|
||||
R_WARN_MAX_CLOUDS = 0xB,
|
||||
R_WARN_MAX_DLIGHTS = 0xC,
|
||||
R_WARN_SMODEL_LIGHTING = 0xD,
|
||||
R_WARN_SMODEL_VIS_DATA_LIMIT = 0xE,
|
||||
R_WARN_SMODEL_SURF_LIMIT = 0xF,
|
||||
R_WARN_SMODEL_SURF_DELAY_LIMIT = 0x10,
|
||||
R_WARN_BSPSURF_DATA_LIMIT = 0x11,
|
||||
R_WARN_BSPSURF_PRETESS_LIMIT = 0x12,
|
||||
R_WARN_MAX_DRAWSURFS = 0x13,
|
||||
R_WARN_GFX_CODE_EMISSIVE_SURF_LIMIT = 0x14,
|
||||
R_WARN_GFX_CODE_TRANS_SURF_LIMIT = 0x15,
|
||||
R_WARN_GFX_GLASS_SURF_LIMIT = 0x16,
|
||||
R_WARN_GFX_MARK_SURF_LIMIT = 0x17,
|
||||
R_WARN_GFX_SPARK_SURF_LIMIT = 0x18,
|
||||
R_WARN_MAX_SCENE_DRAWSURFS = 0x19,
|
||||
R_WARN_MAX_FX_DRAWSURFS = 0x1A,
|
||||
R_WARN_NONEMISSIVE_FX_MATERIAL = 0x1B,
|
||||
R_WARN_NONLIT_MARK_MATERIAL = 0x1C,
|
||||
R_WARN_CMDBUF_OVERFLOW = 0x1D,
|
||||
R_WARN_MISSING_DECL_NONDEBUG = 0x1E,
|
||||
R_WARN_MAX_DYNENT_REFS = 0x1F,
|
||||
R_WARN_MAX_SCENE_DOBJ_REFS = 0x20,
|
||||
R_WARN_MAX_SCENE_MODEL_REFS = 0x21,
|
||||
R_WARN_MAX_SCENE_BRUSH_REFS = 0x22,
|
||||
R_WARN_MAX_CODE_EMISSIVE_INDS = 0x23,
|
||||
R_WARN_MAX_CODE_EMISSIVE_VERTS = 0x24,
|
||||
R_WARN_MAX_CODE_EMISSIVE_ARGS = 0x25,
|
||||
R_WARN_MAX_CODE_TRANS_INDS = 0x26,
|
||||
R_WARN_MAX_CODE_TRANS_VERTS = 0x27,
|
||||
R_WARN_MAX_CODE_TRANS_ARGS = 0x28,
|
||||
R_WARN_MAX_GLASS_INDS = 0x29,
|
||||
R_WARN_MAX_GLASS_VERTS = 0x2A,
|
||||
R_WARN_MAX_MARK_INDS = 0x2B,
|
||||
R_WARN_MAX_MARK_VERTS = 0x2C,
|
||||
R_WARN_MAX_SPARK_INDS = 0x2D,
|
||||
R_WARN_MAX_SPARK_VERTS = 0x2E,
|
||||
R_WARN_DEBUG_ALLOC = 0x2F,
|
||||
R_WARN_SPOT_LIGHT_LIMIT = 0x30,
|
||||
R_WARN_FX_ELEM_LIMIT = 0x31,
|
||||
R_WARN_FX_BOLT_LIMIT = 0x32,
|
||||
R_WARN_WORKER_CMD_SIZE = 0x33,
|
||||
R_WARN_UNKNOWN_STATICMODEL_SHADER = 0x34,
|
||||
R_WARN_UNKNOWN_XMODEL_SHADER = 0x35,
|
||||
R_WARN_DYNAMIC_INDEX_BUFFER_SIZE = 0x36,
|
||||
R_WARN_TOO_MANY_LIGHT_GRID_POINTS = 0x37,
|
||||
R_WARN_FOGABLE_2DTEXT = 0x38,
|
||||
R_WARN_FOGABLE_2DGLYPH = 0x39,
|
||||
R_WARN_SUN_QUERY = 0x3A,
|
||||
R_WARN_ESTIMATED_BOUNDS_TOO_SMALL = 0x3B,
|
||||
R_WARN_COUNT = 0x3C,
|
||||
};
|
||||
|
||||
enum surfType_t
|
||||
{
|
||||
R_SMODEL_SURFTYPE_RIGID = 0x0,
|
||||
@ -10394,6 +10459,11 @@ namespace Game
|
||||
char* buffer;
|
||||
};
|
||||
|
||||
struct Sys_File
|
||||
{
|
||||
HANDLE handle;
|
||||
};
|
||||
|
||||
#pragma endregion
|
||||
|
||||
#ifndef IDA
|
||||
|
@ -23,6 +23,7 @@ namespace Game
|
||||
Sys_ShowConsole_t Sys_ShowConsole = Sys_ShowConsole_t(0x4305E0);
|
||||
Sys_SuspendOtherThreads_t Sys_SuspendOtherThreads = Sys_SuspendOtherThreads_t(0x45A190);
|
||||
Sys_SetValue_t Sys_SetValue = Sys_SetValue_t(0x4B2F50);
|
||||
Sys_CreateFile_t Sys_CreateFile = Sys_CreateFile_t(0x4B2EF0);
|
||||
|
||||
char(*sys_exitCmdLine)[1024] = reinterpret_cast<char(*)[1024]>(0x649FB68);
|
||||
|
||||
|
@ -65,6 +65,9 @@ namespace Game
|
||||
typedef void(*Sys_SetValue_t)(int valueIndex, void* data);
|
||||
extern Sys_SetValue_t Sys_SetValue;
|
||||
|
||||
typedef Sys_File(*Sys_CreateFile_t)(const char* dir, const char* filename);
|
||||
extern Sys_CreateFile_t Sys_CreateFile;
|
||||
|
||||
extern char(*sys_exitCmdLine)[1024];
|
||||
|
||||
extern RTL_CRITICAL_SECTION* s_criticalSection;
|
||||
|
Loading…
Reference in New Issue
Block a user