Volume shit.
This commit is contained in:
parent
1c8c23e008
commit
da7ba34025
@ -179,6 +179,10 @@ namespace Components
|
||||
static float cgFov90 = 90.0f;
|
||||
Utils::Hook::Set<float*>(0x4F8E28, &cgFov90);
|
||||
|
||||
// set max volume to 1
|
||||
static float volume = 1.0f;
|
||||
Utils::Hook::Set<float*>(0x408078, &volume);
|
||||
|
||||
// Hook dvar 'name' registration
|
||||
Utils::Hook(0x40531C, Dvar::RegisterName, HOOK_CALL).Install()->Quick();
|
||||
}
|
||||
|
@ -222,6 +222,7 @@ namespace Components
|
||||
FileSystem::DeleteFile("demos", info.Name + ".dm_13.json");
|
||||
|
||||
// Reset our ui_demo_* dvars here, because the theater menu needs it.
|
||||
// Resetting them has no use, as they don't have any default value!
|
||||
Command::Execute("reset ui_demo_mapname", true);
|
||||
Command::Execute("reset ui_demo_mapname_localized", true);
|
||||
Command::Execute("reset ui_demo_gametype", true);
|
||||
@ -271,7 +272,7 @@ namespace Components
|
||||
Dvar::Var("ui_demo_mapname").Set(info.Mapname);
|
||||
Dvar::Var("ui_demo_mapname_localized").Set(Game::UI_LocalizeMapName(info.Mapname.data()));
|
||||
Dvar::Var("ui_demo_gametype").Set(Game::UI_LocalizeGameType(info.Gametype.data()));
|
||||
Dvar::Var("ui_demo_length").Set(Utils::FormatTimeSpan(info.Length)); // TODO: Parse as readable string
|
||||
Dvar::Var("ui_demo_length").Set(Utils::FormatTimeSpan(info.Length));
|
||||
Dvar::Var("ui_demo_author").Set(info.Author);
|
||||
Dvar::Var("ui_demo_date").Set(std::asctime(std::localtime(&info.TimeStamp)));
|
||||
}
|
||||
@ -363,5 +364,11 @@ namespace Components
|
||||
// Change font size
|
||||
Utils::Hook::Set<BYTE>(0x5AC854, 2);
|
||||
Utils::Hook::Set<BYTE>(0x5AC85A, 2);
|
||||
|
||||
// Command::Add("democycle", [] (Command::Params params)
|
||||
// {
|
||||
// // Cmd_FollowCycle_f
|
||||
// Utils::Hook::Call<void(Game::gentity_t*, int)>(0x458ED0)(Game::g_entities, -1);
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
@ -157,6 +157,8 @@ namespace Game
|
||||
int* demoRecording = (int*)0xA5EA08;
|
||||
int* serverMessageSequence = (int*)0xA3E9B4;
|
||||
|
||||
gentity_t* g_entities = (gentity_t*)0x18835D8;
|
||||
|
||||
void* ReallocateAssetPool(XAssetType type, unsigned int newSize)
|
||||
{
|
||||
int elSize = DB_GetXAssetSizeHandlers[type]();
|
||||
|
@ -315,6 +315,8 @@ namespace Game
|
||||
extern int* demoRecording;
|
||||
extern int* serverMessageSequence;
|
||||
|
||||
extern gentity_t* g_entities;
|
||||
|
||||
void* ReallocateAssetPool(XAssetType type, unsigned int newSize);
|
||||
void Menu_FreeItemMemory(Game::itemDef_t* item);
|
||||
void OOBPrintT(int type, netadr_t netadr, const char* message);
|
||||
|
@ -656,6 +656,26 @@ namespace Game
|
||||
int lastEntityRef;
|
||||
} msg_t;
|
||||
|
||||
typedef struct gclient_s
|
||||
{
|
||||
unsigned char pad[12764];
|
||||
unsigned int team;
|
||||
char pad2[1164];
|
||||
} gclient_t;
|
||||
|
||||
typedef struct gentity_s
|
||||
{
|
||||
unsigned char pad[312]; // 0
|
||||
float origin[3]; // 312
|
||||
float angles[3]; // 324
|
||||
char pad2[8];
|
||||
gclient_t* client; // 344
|
||||
unsigned char pad3[28];
|
||||
short classname;
|
||||
short pad4;
|
||||
unsigned char pad5[248];
|
||||
} gentity_t;
|
||||
|
||||
#pragma pack(push, 1)
|
||||
typedef struct client_s
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user