mirror of
https://github.com/Mauler125/r5sdk.git
synced 2025-02-09 19:15:03 +01:00
* Partially rebuild CGlobalVarsBase and CGlobalVars struct. * Partially implement BuildAINFile (disk builder) written by BobTheBob9. All that needs to be found are the addresses/offsets for 'pUnkStruct0Count' and 'pUnkLinkStruct1Count' (see ai_node.h). I didn't have time for it yet. * Patch call which restarts the engine once AIN file has been build (so it doesn't get cleared from memory). * Temporarily patch write operation in 'Detours_LevelInit()' which writes out of scope since the navmesh structure is misaligned somewhere still with a few bytes. NOTE: 'CAI_NetworkBuilder::BuildFile()' is for now commented out until the 2 other structs are found in the game dll. Once found then we could start fixing the struct offsets and hope it works as-is.
39 lines
1.9 KiB
C++
39 lines
1.9 KiB
C++
#pragma once
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose:
|
|
//-----------------------------------------------------------------------------
|
|
enum GameMode_t
|
|
{
|
|
NO_MODE = 0,
|
|
MP_MODE,
|
|
PVE_MODE,
|
|
SP_MODE,
|
|
};
|
|
|
|
//-----------------------------------------------------------------------------
|
|
// Purpose: Global variables used by shared code
|
|
//-----------------------------------------------------------------------------
|
|
class CGlobalVarsBase
|
|
{
|
|
public:
|
|
|
|
float m_nUnkTime;
|
|
float m_rRealTime; // Absolute time (per frame still - Use Plat_FloatTime() for a high precision real time.
|
|
int m_nFrameCount; // Absolute frame counter - continues to increase even if game is paused - never resets.
|
|
float m_fAbsoluteFrameTime; // Non-paused frametime
|
|
float m_fAbsoluteFrameStartTimeStdDev;
|
|
float m_fFrameTime; // Time spent on last server or client frame (has nothing to do with think intervals) (Also empty on dedicated)
|
|
float m_fCurTime;
|
|
char m_nPad0[24]; // All unknown.
|
|
int m_nMaxClients; // Current maxplayers setting
|
|
int m_nMaxMilesAudioQueues_Maybe; // Only used on the server.
|
|
GameMode_t m_nGameMode;; // 1 (MP) 2 (PVE) 3 (SP)
|
|
int m_nTickCount; // Simulation ticks - does not increase when game is paused - resets on restart.
|
|
int m_nUnk0;
|
|
int m_nUnk1;
|
|
|
|
// The following seem to be mainly used in c:\depot\r5launch\src\engine\client\clientstate.cpp.
|
|
int m_nUnk2;
|
|
int m_nUnk3; // Seems to be used on client only.
|
|
int m_nUnk4; // Seems to be used on client only.
|
|
}; |