mirror of
https://github.com/dashr9230/SA-MP.git
synced 2024-12-22 22:47:29 +08:00
[saco] Implement CRemotePlayer constructor
* Implement/match `CRemotePlayer::ResetAllSyncAttributes()`
This commit is contained in:
parent
d9fe4ea5d1
commit
9bbc1fb3d8
@ -38,6 +38,7 @@ typedef struct _GAME_SETTINGS {
|
||||
#include "../raknet/GetTime.h"
|
||||
|
||||
#include "net/localplayer.h"
|
||||
#include "net/remoteplayer.h"
|
||||
#include "net/netrpc.h"
|
||||
#include "net/actorpool.h"
|
||||
#include "net/playerpool.h"
|
||||
@ -85,3 +86,6 @@ void SetStringFromQuotedCommandLine(char *szCmdLine, char *szString);
|
||||
void InitSettings();
|
||||
|
||||
void UnFuck(DWORD addr, int size);
|
||||
|
||||
//----------------------------------------------------
|
||||
// EOF
|
||||
|
63
saco/net/remoteplayer.cpp
Normal file
63
saco/net/remoteplayer.cpp
Normal file
@ -0,0 +1,63 @@
|
||||
|
||||
#include "../main.h"
|
||||
|
||||
extern CGame *pGame;
|
||||
|
||||
using namespace RakNet;
|
||||
extern CNetGame* pNetGame;
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
CRemotePlayer::CRemotePlayer()
|
||||
{
|
||||
field_1E7 = 0;
|
||||
field_10A = 0;
|
||||
field_1E5 = -1;
|
||||
field_1DD = 0;
|
||||
field_1B8 = 0;
|
||||
field_109 = -1;
|
||||
field_4 = 1;
|
||||
field_0 = 0;
|
||||
field_8 = 0;
|
||||
field_1F9 = 0;
|
||||
field_C = 0;
|
||||
field_10C = 0;
|
||||
field_1C1 = 0;
|
||||
field_1D5 = GetTickCount();
|
||||
field_1D9 = GetTickCount();
|
||||
field_1B9 = GetTickCount();
|
||||
ResetAllSyncAttributes();
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
void CRemotePlayer::ResetAllSyncAttributes()
|
||||
{
|
||||
field_1E7 = 0;
|
||||
field_1B0 = 0;
|
||||
field_1AC = 0;
|
||||
field_1E1 = 0;
|
||||
field_10B = 0;
|
||||
field_110 = 0;
|
||||
field_1ED = 0;
|
||||
field_1F1 = 0;
|
||||
field_1F5 = 0;
|
||||
field_C = 0;
|
||||
field_1B4 = 0;
|
||||
field_1C5 = 2;
|
||||
memset(field_C5, 0, sizeof(field_C5));
|
||||
memset(field_19, 0, sizeof(field_19));
|
||||
memset(field_AD, 0, sizeof(field_AD));
|
||||
memset(field_8E, 0, sizeof(field_8E));
|
||||
memset(field_1C9, 0, sizeof(field_1C9));
|
||||
if(field_1F9)
|
||||
{
|
||||
pGame->DisableMarker(field_1F9);
|
||||
field_1F9 = 0;
|
||||
}
|
||||
field_1E9 = 0;
|
||||
if(pNetGame)
|
||||
field_1BD = pNetGame->GetTime();
|
||||
}
|
||||
|
||||
//----------------------------------------------------
|
62
saco/net/remoteplayer.h
Normal file
62
saco/net/remoteplayer.h
Normal file
@ -0,0 +1,62 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
//----------------------------------------------------
|
||||
|
||||
#pragma pack(1)
|
||||
class CRemotePlayer
|
||||
{
|
||||
private:
|
||||
//char _gap0[509];
|
||||
int field_0;
|
||||
int field_4;
|
||||
int field_8;
|
||||
char field_C;
|
||||
|
||||
char _gapD[12];
|
||||
|
||||
char field_19[63];
|
||||
|
||||
char _gap58[54];
|
||||
|
||||
char field_8E[31];
|
||||
char field_AD[24];
|
||||
char field_C5[68];
|
||||
char field_109;
|
||||
char field_10A;
|
||||
char field_10B;
|
||||
int field_10C;
|
||||
int field_110;
|
||||
|
||||
char _gap114[152];
|
||||
|
||||
int field_1AC;
|
||||
int field_1B0;
|
||||
int field_1B4;
|
||||
char field_1B8;
|
||||
DWORD field_1B9;
|
||||
DWORD field_1BD;
|
||||
int field_1C1;
|
||||
int field_1C5;
|
||||
char field_1C9[12];
|
||||
DWORD field_1D5;
|
||||
DWORD field_1D9;
|
||||
int field_1DD;
|
||||
int field_1E1;
|
||||
short field_1E5;
|
||||
short field_1E7;
|
||||
int field_1E9;
|
||||
int field_1ED;
|
||||
int field_1F1;
|
||||
int field_1F5;
|
||||
int field_1F9;
|
||||
|
||||
public:
|
||||
|
||||
CRemotePlayer();
|
||||
|
||||
void ResetAllSyncAttributes();
|
||||
|
||||
};
|
||||
|
||||
//----------------------------------------------------
|
Loading…
Reference in New Issue
Block a user