mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 14:37:29 +08:00
[saco] Implement/match QuitGame()
This commit is contained in:
parent
5048ebb8bf
commit
a99e62029f
@ -28,6 +28,9 @@ CUnkClass15 *pUnkClass15=0;
|
|||||||
|
|
||||||
BOOL bGameInited=FALSE;
|
BOOL bGameInited=FALSE;
|
||||||
|
|
||||||
|
BOOL bQuitGame=FALSE;
|
||||||
|
DWORD dwStartQuitTick=0;
|
||||||
|
|
||||||
WORD wVehicleComponentDebug=0;
|
WORD wVehicleComponentDebug=0;
|
||||||
|
|
||||||
IDirect3D9 *pD3D;
|
IDirect3D9 *pD3D;
|
||||||
@ -428,6 +431,17 @@ void TheGraphicsLoop()
|
|||||||
|
|
||||||
//----------------------------------------------------
|
//----------------------------------------------------
|
||||||
|
|
||||||
|
void QuitGame()
|
||||||
|
{
|
||||||
|
if(pNetGame && pNetGame->GetGameState() == GAMESTATE_CONNECTED) {
|
||||||
|
pNetGame->GetRakClient()->Disconnect(500);
|
||||||
|
}
|
||||||
|
bQuitGame = TRUE;
|
||||||
|
dwStartQuitTick = GetTickCount();
|
||||||
|
}
|
||||||
|
|
||||||
|
//----------------------------------------------------
|
||||||
|
|
||||||
void InitSettings()
|
void InitSettings()
|
||||||
{
|
{
|
||||||
PCHAR szCmdLine = GetCommandLineA();
|
PCHAR szCmdLine = GetCommandLineA();
|
||||||
|
@ -1,6 +1,8 @@
|
|||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
|
#define GAMESTATE_CONNECTED 5
|
||||||
|
|
||||||
#define GAMESTATE_WAIT_CONNECT 1
|
#define GAMESTATE_WAIT_CONNECT 1
|
||||||
|
|
||||||
struct struc_41
|
struct struc_41
|
||||||
@ -70,6 +72,7 @@ public:
|
|||||||
void InitPools();
|
void InitPools();
|
||||||
|
|
||||||
DWORD GetTime();
|
DWORD GetTime();
|
||||||
|
int GetGameState() { return m_iGameState; };
|
||||||
BOOL GetWalkStyle() { return field_3D5->bUseCJWalk; };
|
BOOL GetWalkStyle() { return field_3D5->bUseCJWalk; };
|
||||||
|
|
||||||
CPlayerPool * GetPlayerPool() { return m_pPools->pPlayerPool; };
|
CPlayerPool * GetPlayerPool() { return m_pPools->pPlayerPool; };
|
||||||
|
Loading…
Reference in New Issue
Block a user