mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[server] Implement/match CPlayer::ToggleRaceCheckpoint(...)
This commit is contained in:
parent
9dfa35f439
commit
e45235b6cf
@ -59,3 +59,27 @@ void CPlayer::ToggleCheckpoint(BOOL bEnabled)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CPlayer::ToggleRaceCheckpoint(BOOL bEnabled)
|
||||
{
|
||||
m_bRaceCheckpointEnabled = bEnabled;
|
||||
m_bInRaceCheckpoint = FALSE;
|
||||
|
||||
RakNet::BitStream bsParams;
|
||||
|
||||
if (bEnabled)
|
||||
{
|
||||
bsParams.Write(m_byteRaceCheckpointType);
|
||||
bsParams.Write(m_vecRaceCheckpoint.X);
|
||||
bsParams.Write(m_vecRaceCheckpoint.Y);
|
||||
bsParams.Write(m_vecRaceCheckpoint.Z);
|
||||
bsParams.Write(m_vecRaceNextCheckpoint.X);
|
||||
bsParams.Write(m_vecRaceNextCheckpoint.Y);
|
||||
bsParams.Write(m_vecRaceNextCheckpoint.Z);
|
||||
bsParams.Write(m_fRaceCheckpointSize);
|
||||
pNetGame->SendToPlayer(RPC_SetRaceCheckpoint, &bsParams, m_PlayerID, 2);
|
||||
} else {
|
||||
pNetGame->SendToPlayer(RPC_DisableRaceCheckpoint, &bsParams, m_PlayerID, 2);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
@ -153,7 +153,11 @@ public:
|
||||
float m_fCheckpointSize;
|
||||
BOOL m_bInCheckpoint;
|
||||
|
||||
char _pad2BBE[33];
|
||||
VECTOR m_vecRaceCheckpoint;
|
||||
VECTOR m_vecRaceNextCheckpoint;
|
||||
BYTE m_byteRaceCheckpointType;
|
||||
float m_fRaceCheckpointSize;
|
||||
BOOL m_bInRaceCheckpoint;
|
||||
|
||||
int field_2BDF;
|
||||
short field_2BE3[11];
|
||||
@ -166,7 +170,7 @@ public:
|
||||
short field_2C32;
|
||||
int field_2C34;
|
||||
BOOL m_bCheckpointEnabled;
|
||||
int field_2C3C;
|
||||
BOOL m_bRaceCheckpointEnabled;
|
||||
int field_2C40;
|
||||
|
||||
// Weapon data
|
||||
@ -201,6 +205,7 @@ public:
|
||||
|
||||
void SetCheckpoint(float fX, float fY, float fZ, float fSize);
|
||||
void ToggleCheckpoint(BOOL bEnabled);
|
||||
void ToggleRaceCheckpoint(BOOL bEnabled);
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user