SA-MP/saco/net/localplayer.cpp
RD42 3b45f9932c [saco] Implement CLocalPlayer ctor
* Updates CGame ctor
* Implements `CGame::FindPlayerPed()`
* Implements `CLocalPlayer::ResetAllSyncAttributes()`
* Updates CPlayerPool ctor
2024-02-15 22:41:04 +08:00

80 lines
1.5 KiB
C++

#include "../main.h"
extern CGame *pGame;
//----------------------------------------------------------
CLocalPlayer::CLocalPlayer()
{
field_147 = GetTickCount();
field_137 = GetTickCount();
field_13B = GetTickCount();
field_1D0 = 0;
field_2E2 = 0;
field_2D6 = GetTickCount();
field_2F6 = 0;
m_pPlayerPed = pGame->FindPlayerPed();
field_F0 = 0;
field_F4 = 0;
field_10D = 0;
field_30A = 0;
field_10F = GetTickCount();
field_113 = GetTickCount();
field_13F = GetTickCount();
field_117 = field_10F;
field_11B = field_10F;
field_108 = 0;
field_30F = 0;
field_310 = -1;
field_306 = 0;
ResetAllSyncAttributes();
int x=0;
while(x!=13) {
field_18A[x] = 0;
field_197[x] = 0;
x++;
}
field_10C = -1;
}
//----------------------------------------------------------
void CLocalPlayer::ResetAllSyncAttributes()
{
field_17D = 0;
field_2FA = 0;
field_302 = 0;
field_2FE = 0;
field_1CF = 0;
field_FA = -1;
field_1D0 = 0;
field_318 = -1;
field_11F = -1;
field_121 = -1;
field_123 = -1;
memset(field_12B, 0, sizeof(field_12B));
memset(field_3F, 0, sizeof(field_3F));
memset(field_5E, 0, sizeof(field_5E));
field_92 = 0;
memset(field_94, 0, sizeof(field_94));
memset(field_0, 0, sizeof(field_0));
memset(field_3C, 0, sizeof(field_3C));
memset(field_D8, 0, sizeof(field_D8));
field_FC = 0;
field_100 = 0;
field_185 = -1;
field_187 = -1;
field_181 = GetTickCount();
field_189 = 0;
field_2DA = 0;
field_2DE = 0;
field_127 = GetTickCount();
}
//----------------------------------------------------------