mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-23 06:57:31 +08:00
cbca7594a1
* Implement `CNetGame::SetMyZAngle(...)`
107 lines
2.6 KiB
C++
107 lines
2.6 KiB
C++
|
|
#pragma once
|
|
|
|
#define GAMESTATE_NONE 0 // used for debugging modes and such
|
|
#define GAMESTATE_CONNECTING 1
|
|
#define GAMESTATE_CONNECTED 2
|
|
#define GAMESTATE_AWAIT_JOIN 3
|
|
|
|
#define GAMESTATE_RESTARTING 5
|
|
|
|
//----------------------------------------------------
|
|
|
|
class CNetGame // size: 910 bytes
|
|
{
|
|
private:
|
|
RakClientInterface *m_pRakClient;
|
|
CPlayerPool *m_pPlayerPool;
|
|
CVehiclePool *m_pVehiclePool;
|
|
int m_iGameState;
|
|
BOOL m_bLanMode;
|
|
|
|
void UpdateNetwork();
|
|
|
|
// Packet handlers
|
|
void Packet_AimSync(Packet *p);
|
|
void Packet_PassengerSync(Packet *p);
|
|
void Packet_ConnectionSucceeded(Packet *p);
|
|
void Packet_RSAPublicKeyMismatch(Packet* packet);
|
|
void Packet_ConnectionBanned(Packet* packet);
|
|
void Packet_ConnectionRequestAccepted(Packet* packet);
|
|
void Packet_NoFreeIncomingConnections(Packet* packet);
|
|
void Packet_DisconnectionNotification(Packet* packet);
|
|
void Packet_ConnectionLost(Packet* packet);
|
|
void Packet_InvalidPassword(Packet* packet);
|
|
void Packet_ModifiedPacket(Packet* packet);
|
|
void Packet_ConnectAttemptFailed(Packet* packet);
|
|
void Packet_TrailerSync(Packet *p);
|
|
|
|
public:
|
|
|
|
int m_iSpawnsAvailable;
|
|
bool m_bShowPlayerMarkers;
|
|
int m_iPlayerMarkersMode;
|
|
bool m_bTirePopping;
|
|
BYTE m_byteWorldTime;
|
|
BYTE m_byteWorldMinute;
|
|
BYTE m_byteWeather;
|
|
char _gap21[16];
|
|
BYTE m_byteFriendlyFire;
|
|
bool m_bAllowWeapons;
|
|
bool m_bNameTagLOS;
|
|
float m_fGravity;
|
|
int m_iDeathDropMoney;
|
|
BYTE m_byteHoldTime;
|
|
bool m_bInstagib;
|
|
bool m_bZoneNames;
|
|
bool m_bLimitGlobalChatRadius;
|
|
bool m_bUseCJWalk;
|
|
float m_fGlobalChatRadius;
|
|
float m_fNameTagDrawDistance;
|
|
bool m_bDisableEnterExits;
|
|
DWORD m_dwMapIcon[100];
|
|
int field_1DA;
|
|
int field_1DE;
|
|
int field_1E2;
|
|
char _gap1E6[12];
|
|
int field_1F2;
|
|
char _gap1F6[4];
|
|
int field_1FA;
|
|
int field_1FE;
|
|
|
|
char m_szHostName[256];
|
|
char m_szHostOrIp[128];
|
|
int m_iPort;
|
|
|
|
CGameMode* m_pGameMode;
|
|
CScriptTimers* m_pScriptTimers;
|
|
|
|
public:
|
|
|
|
CNetGame();
|
|
~CNetGame();
|
|
|
|
int GetGameState() { return m_iGameState; };
|
|
void SetGameState(int iGameState) { m_iGameState = iGameState; };
|
|
void SetLanMode(BOOL bMode) { m_bLanMode = bMode; };
|
|
|
|
CPlayerPool * GetPlayerPool() { return m_pPlayerPool; };
|
|
RakClientInterface * GetRakClient() { return m_pRakClient; };
|
|
CGameMode * GetBotMode() { return m_pGameMode; };
|
|
|
|
void Init(PCHAR szHostOrIp,int iPort,PCHAR szPlayerName,PCHAR szPass,PCHAR szNpcMode);
|
|
void Process();
|
|
void ResetVehiclePool();
|
|
void ResetPlayerPool();
|
|
void ShutdownForGameModeRestart();
|
|
|
|
void sub_415EC0(VEHICLEID VehicleID, BOOL a2);
|
|
void SetMyZAngle(float fAngle);
|
|
|
|
void SetPlayerAdded(PLAYERID playerId, BOOL a2);
|
|
|
|
void StopRecordingPlayback();
|
|
};
|
|
|
|
//----------------------------------------------------
|