[bot] Implement CNetGame::Packet_TrailerSync(...)

This commit is contained in:
RD42 2024-04-25 22:20:29 +08:00
parent 9be2b5e019
commit 4358eea329
2 changed files with 26 additions and 0 deletions

View File

@ -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)
{
}

View File

@ -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];