Fix IAppSystem VFTable

Destruvtor is prepended on every class in-engine. Reflected in SDK. Also removed extraneous method from ICvar causing other methods below it to misalign after the IAppSystem change.
This commit is contained in:
Kawe Mazidjatari 2023-02-06 02:15:01 +01:00
parent 308a700e25
commit a8c5ed45fd
4 changed files with 7 additions and 15 deletions

View File

@ -54,6 +54,8 @@ enum AppSystemTier_t
abstract_class IAppSystem
{
public:
virtual ~IAppSystem() = 0; // Prepended on each class derived class in assembly.
// Here's where the app systems get to learn about each other
virtual bool Connect(CreateInterfaceFn factory) = 0;
virtual void Disconnect() = 0;
@ -83,6 +85,8 @@ template< class IInterface >
class CBaseAppSystem : public IInterface
{
public:
virtual ~CBaseAppSystem() = 0; // Prepended on each class derived class in assembly.
// Here's where the app systems get to learn about each other
virtual bool Connect(CreateInterfaceFn factory) = 0;
virtual void Disconnect() = 0;

View File

@ -60,8 +60,6 @@ public:
virtual void UnregisterConCommand( ConCommandBase *pCommandBase ) = 0;
virtual void UnregisterConCommands( CVarDLLIdentifier_t id ) = 0;
virtual void sub_14062B1F0() = 0;
// If there is a +<varname> <value> on the command line, this returns the value.
// Otherwise, it returns NULL.
virtual const char* GetCommandLineValue( const char *pVariableName ) = 0;

View File

@ -178,19 +178,6 @@ public:
abstract_class IFileSystem : public IAppSystem, public IBaseFileSystem
{
public:
virtual ~IFileSystem() = 0;
//--------------------------------------------------------
// IAppSystem methods
//--------------------------------------------------------
virtual bool Connect(CreateInterfaceFn factory) = 0;
virtual void Disconnect() = 0;
virtual void* QueryInterface(const char* pInterfaceName) = 0;
virtual InitReturnVal_t Init() = 0;
virtual void Shutdown() = 0;
virtual AppSystemTier_t GetTier() = 0;
virtual void Reconnect(CreateInterfaceFn factory, const char* pInterfaceName) = 0;
//--------------------------------------------------------
virtual bool IsSteam() const = 0;

View File

@ -331,6 +331,9 @@ class VCVar : public IDetour
{
g_pCVar = g_GameDll.FindPatternSIMD("48 83 EC 28 48 8B 05 ?? ?? ?? ?? 48 8D 0D ?? ?? ?? ?? 48 85 C0 48 89 15")
.FindPatternSelf("48 8D 0D", CMemory::Direction::DOWN, 40).ResolveRelativeAddressSelf(0x3, 0x7).RCast<CCvar*>();
//g_pCVar = g_GameDll.FindPatternSIMD("40 53 48 83 EC 20 48 83 3D ?? ?? ?? ?? ?? 48 8B D9 74 09") // Actual CCvar, above is the vtable ptr.
//.FindPatternSelf("48 83 3D", CMemory::Direction::DOWN).ResolveRelativeAddressSelf(0x3, 0x8).RCast<CCvar*>();
}
virtual void GetCon(void) const { }
virtual void Attach(void) const { }