[server] Implement/match CPlayer::SetSpawnInfo(...)

This commit is contained in:
RD42 2024-09-15 23:18:47 +08:00
parent 155c7ecf08
commit 0b15ccfb87
3 changed files with 28 additions and 9 deletions

View File

@ -10,3 +10,10 @@ void CPlayer::Say(unsigned char * szText, BYTE byteTextLen)
//----------------------------------------------------
void CPlayer::SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn)
{
memcpy(&m_SpawnInfo,pSpawn,sizeof(PLAYER_SPAWN_INFO));
m_bHasSpawnInfo = TRUE;
}
//----------------------------------------------------

View File

@ -2,17 +2,35 @@
#ifndef SAMPSRV_PLAYER_H
#define SAMPSRV_PLAYER_H
#pragma pack(1)
typedef struct _PLAYER_SPAWN_INFO
{
char _pad0[46];
} PLAYER_SPAWN_INFO;
//----------------------------------------------------
#pragma pack(1)
class CPlayer
{
private:
char _gap0[11486];
public:
// Size: 11486
char _pad0[11261];
PLAYER_SPAWN_INFO m_SpawnInfo;
BOOL m_bHasSpawnInfo;
char _pad2C2F[175];
void Say(unsigned char * szText, BYTE byteTextLength);
void SetSpawnInfo(PLAYER_SPAWN_INFO *pSpawn);
};
//----------------------------------------------------
#endif
//----------------------------------------------------

View File

@ -2,12 +2,6 @@
#ifndef SAMPSRV_PLAYERPOOL_H
#define SAMPSRV_PLAYERPOOL_H
// TODO: PLAYER_SPAWN_INFO
typedef struct _PLAYER_SPAWN_INFO // size: 46
{
char _gap0[46];
} PLAYER_SPAWN_INFO;
class CPlayerPool // size: WL 199024
{
private: