mirror of
https://github.com/dashr9230/SA-MP.git
synced 2025-01-03 16:13:34 +08:00
[bot] Implement CNetGame::Packet_TrailerSync(...)
This commit is contained in:
parent
9be2b5e019
commit
4358eea329
@ -10,6 +10,12 @@ typedef struct _AIM_SYNC_DATA // size: 31
|
||||
char _gap0[31];
|
||||
} AIM_SYNC_DATA;
|
||||
|
||||
#pragma pack(1)
|
||||
typedef struct _TRAILER_SYNC_DATA // size: 54
|
||||
{
|
||||
char _gap0[54];
|
||||
} TRAILER_SYNC_DATA;
|
||||
|
||||
char unnamed_2[63];
|
||||
char unnamed_5[1000][24];
|
||||
BOOL unnamed_6[MAX_PLAYERS];
|
||||
@ -243,6 +249,9 @@ void CNetGame::UpdateNetwork()
|
||||
case ID_AIM_SYNC:
|
||||
Packet_AimSync(pkt);
|
||||
break;
|
||||
case ID_TRAILER_SYNC:
|
||||
Packet_TrailerSync(pkt);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -267,6 +276,22 @@ void CNetGame::Packet_AimSync(Packet *p)
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CNetGame::Packet_TrailerSync(Packet *p)
|
||||
{
|
||||
RakNet::BitStream bsTrailerSync((PCHAR)p->data, p->length, false);
|
||||
if(GetGameState() != GAMESTATE_CONNECTED) return;
|
||||
|
||||
BYTE bytePacketID=0;
|
||||
BYTE bytePlayerID=0;
|
||||
TRAILER_SYNC_DATA trSync;
|
||||
|
||||
bsTrailerSync.Read(bytePacketID);
|
||||
bsTrailerSync.Read(bytePlayerID);
|
||||
bsTrailerSync.Read((PCHAR)&trSync, sizeof(TRAILER_SYNC_DATA));
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CNetGame::Packet_ModifiedPacket(Packet* packet)
|
||||
{
|
||||
}
|
||||
|
@ -20,6 +20,7 @@ private:
|
||||
// Packet handlers
|
||||
void Packet_AimSync(Packet *p);
|
||||
void Packet_ModifiedPacket(Packet* packet);
|
||||
void Packet_TrailerSync(Packet *p);
|
||||
|
||||
int m_iSpawnsAvailable;
|
||||
char _gap18[6];
|
||||
|
Loading…
x
Reference in New Issue
Block a user