mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Add CServerGameDLL interface to SDK (unfinished) * Inline all CHostState members. Calling discrete member functions will result in a corrupt stack. It also alters with the VTable layout in the engine since we assign our SDK instance directly to it. Forcing everything to be inline (like the assembled counterpart within the executable itself) will ensure no virtual calls will get created and misalign the base VTable. * Patch SQVM_CompileError to call SQVM_Error with the severity flag set to false (0 = do not terminate process, 1 is terminate process).
32 lines
979 B
C++
32 lines
979 B
C++
//=============================================================================//
|
|
//
|
|
// Purpose: Interface server dll virtual functions to the SDK.
|
|
//
|
|
// $NoKeywords: $
|
|
//=============================================================================//
|
|
|
|
class CServerGameDLL
|
|
{
|
|
public:
|
|
void GameInit(void);
|
|
void PrecompileScriptsJob(void);
|
|
void LevelShutdown(void);
|
|
void GameShutdown(void);
|
|
float GetTickInterval(void);
|
|
};
|
|
|
|
extern CServerGameDLL* g_pServerGameDLL;
|
|
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
class HServerGameDLL : public IDetour
|
|
{
|
|
virtual void debugp()
|
|
{
|
|
std::cout << "| VAR: g_pServerGameDLL : 0x" << std::hex << std::uppercase << g_pServerGameDLL << std::setw(0) << " |" << std::endl;
|
|
std::cout << "+----------------------------------------------------------------+" << std::endl;
|
|
}
|
|
};
|
|
///////////////////////////////////////////////////////////////////////////////
|
|
|
|
REGISTER(HServerGameDLL);
|