mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[bot] Implement GetPacketID(...)
This commit is contained in:
parent
16635b4ea0
commit
002330f840
@ -14,9 +14,26 @@ char unnamed_4[1000][63];
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
// TODO: length assert has to be at line 397
|
||||
// what the fuck is on top of the netgame.cpp that makes GetPacketID is at line 397 ????
|
||||
BYTE GetPacketID(Packet *p)
|
||||
{
|
||||
if (p==0) return 255;
|
||||
|
||||
if ((unsigned char)p->data[0] == ID_TIMESTAMP) {
|
||||
assert(p->length > sizeof(unsigned char) + sizeof(unsigned long));
|
||||
return (unsigned char) p->data[sizeof(unsigned char) + sizeof(unsigned long)];
|
||||
}
|
||||
else {
|
||||
return (unsigned char) p->data[0];
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CNetGame::CNetGame()
|
||||
{
|
||||
|
||||
// nothing
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user