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

This commit is contained in:
RD42 2024-04-25 22:19:11 +08:00
parent 16439ae77d
commit 9be2b5e019
2 changed files with 26 additions and 0 deletions

View File

@ -4,6 +4,12 @@
char szGameModeFile[256];
#pragma pack(1)
typedef struct _AIM_SYNC_DATA // size: 31
{
char _gap0[31];
} AIM_SYNC_DATA;
char unnamed_2[63];
char unnamed_5[1000][24];
BOOL unnamed_6[MAX_PLAYERS];
@ -234,6 +240,9 @@ void CNetGame::UpdateNetwork()
case ID_MODIFIED_PACKET:
Packet_ModifiedPacket(pkt);
break;
case ID_AIM_SYNC:
Packet_AimSync(pkt);
break;
}
}
}
@ -242,6 +251,22 @@ void CNetGame::UpdateNetwork()
// PACKET HANDLERS INTERNAL
//----------------------------------------------------
void CNetGame::Packet_AimSync(Packet *p)
{
RakNet::BitStream bsAimSync((PCHAR)p->data, p->length, false);
AIM_SYNC_DATA aimSync;
BYTE bytePacketID=0;
BYTE bytePlayerID=0;
if(GetGameState() != GAMESTATE_CONNECTED) return;
bsAimSync.Read(bytePacketID);
bsAimSync.Read(bytePlayerID);
bsAimSync.Read((PCHAR)&aimSync,sizeof(AIM_SYNC_DATA));
}
//----------------------------------------------------
void CNetGame::Packet_ModifiedPacket(Packet* packet)
{
}

View File

@ -18,6 +18,7 @@ private:
void UpdateNetwork();
// Packet handlers
void Packet_AimSync(Packet *p);
void Packet_ModifiedPacket(Packet* packet);
int m_iSpawnsAvailable;