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

* Add `CNetGame::UpdateNetwork()`
* Update `CNetGame::Process()`
This commit is contained in:
RD42 2024-04-25 22:14:30 +08:00
parent 9c94cab39f
commit 16439ae77d
2 changed files with 41 additions and 2 deletions

View File

@ -187,10 +187,14 @@ float GetElapsedTime()
void CNetGame::Process()
{
float fElapsedTime = GetElapsedTime();
UpdateNetwork();
// TODO: CNetGame::Process (W: 00418370 L: 080AD6A4)
/*
v2 = sub_80AC130();
sub_80AE6A4(this);
if ( this->field_C == 2 )
{
if ( this->field_386 )
@ -212,6 +216,36 @@ void CNetGame::Process()
}*/
}
//----------------------------------------------------
// UPDATE NETWORK
//----------------------------------------------------
void CNetGame::UpdateNetwork()
{
Packet* pkt=NULL;
unsigned char packetIdentifier;
while((pkt = m_pRakClient->Receive()))
{
packetIdentifier = GetPacketID(pkt);
switch(packetIdentifier)
{
case ID_MODIFIED_PACKET:
Packet_ModifiedPacket(pkt);
break;
}
}
}
//----------------------------------------------------
// PACKET HANDLERS INTERNAL
//----------------------------------------------------
void CNetGame::Packet_ModifiedPacket(Packet* packet)
{
}
//----------------------------------------------------
void CNetGame::sub_415EA0(PLAYERID playerId, BOOL a2)

View File

@ -15,6 +15,11 @@ private:
int m_iGameState;
BOOL m_bLanMode;
void UpdateNetwork();
// Packet handlers
void Packet_ModifiedPacket(Packet* packet);
int m_iSpawnsAvailable;
char _gap18[6];
BYTE m_byteWorldTime;