mirror of
https://github.com/dashr9230/SA-MP.git
synced 2026-10-11 01:38:17 +08:00
[saco] Match CLocalPlayer::RequestClass and SendStatsUpdate; the stats packet is ID_STATS_UPDATE over Send, not an RPC
This commit is contained in:
1 parent
67d0758e1d
commit
a9f1f78a02
3 files changed
+29
No files matched your search
@@ -154,6 +154,8 @@ public:
|
||||
void sub_100A1C10();
|
||||
void sub_100A1DB0(int a1);
|
||||
|
||||
int FUNC_100A0F90(); // .text:100A0F90
|
||||
|
||||
void LoadScene(char* szScene);
|
||||
int GetMemoryUsedForStreaming();
|
||||
int GetMemoryAvailableForStreaming();
|
||||
|
||||
@@ -160,3 +160,28 @@ void CLocalPlayer::FUNC_10006AC0(WORD a1, float a2, int a3, int a4)
|
||||
bsSend.Write(a4);
|
||||
pNetGame->GetRakClient()->RPC(RPC_ActorDamage, &bsSend, HIGH_PRIORITY, RELIABLE_ORDERED, 0, FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CLocalPlayer::RequestClass(int iClass)
|
||||
{
|
||||
RakNet::BitStream bsSend;
|
||||
|
||||
bsSend.Write(iClass);
|
||||
pNetGame->GetRakClient()->RPC(RPC_RequestClass, &bsSend, HIGH_PRIORITY, RELIABLE, 0, FALSE);
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CLocalPlayer::SendStatsUpdate()
|
||||
{
|
||||
RakNet::BitStream bsSend;
|
||||
|
||||
int iMoney = pGame->FUNC_100A0F90();
|
||||
int iDrunkLevel = m_pPlayerPed->sub_100ADFA0();
|
||||
|
||||
bsSend.Write((BYTE)ID_STATS_UPDATE);
|
||||
bsSend.Write(iMoney);
|
||||
bsSend.Write(iDrunkLevel);
|
||||
pNetGame->GetRakClient()->Send(&bsSend, HIGH_PRIORITY, UNRELIABLE, 0);
|
||||
}
|
||||
@@ -118,6 +118,8 @@ public:
|
||||
|
||||
BOOL IsInRCMode() { return m_bInRCMode; };
|
||||
|
||||
void RequestClass(int iClass); // .text:100058D0
|
||||
void SendStatsUpdate(); // .text:10005D00
|
||||
void FUNC_10005BF0(WORD a1); // .text:10005BF0
|
||||
void FUNC_10003570(); // .text:10003570
|
||||
|
||||
|
||||
Reference in new issue
Block a user