3#ifndef GAME_CLIENT_COMPONENTS_GHOST_H
4#define GAME_CLIENT_COMPONENTS_GHOST_H
79 void Reset(
int ChunkSize = 25 * 60);
125 static void GetGhostSkin(
CGhostSkin *pSkin,
const char *pSkinName,
int UseCustomColor,
int ColorBody,
int ColorFeet);
129 void GetPath(
char *pBuf,
int Size,
const char *pPlayerName,
int Time = -1)
const;
150 virtual int Sizeof()
const override {
return sizeof(*this); }
154 virtual void OnReset()
override;
156 virtual void OnMessage(
int MsgType,
void *pRawMsg)
override;
164 int Load(
const char *pFilename);
Definition: component.h:20
void Reset()
Definition: ghost.h:100
CTeeRenderInfo m_RenderInfo
Definition: ghost.h:90
char m_aPlayer[MAX_NAME_LENGTH]
Definition: ghost.h:94
CGhostPath m_Path
Definition: ghost.h:92
int m_PlaybackPos
Definition: ghost.h:95
CGhostItem()
Definition: ghost.h:97
CGhostSkin m_Skin
Definition: ghost.h:91
bool Empty() const
Definition: ghost.h:99
int m_StartTick
Definition: ghost.h:93
std::vector< CGhostCharacter * > m_vpChunks
Definition: ghost.h:68
CGhostPath(const CGhostPath &Other)=delete
CGhostPath & operator=(const CGhostPath &Other)=delete
~CGhostPath()
Definition: ghost.h:72
CGhostCharacter * Get(int Index)
Definition: ghost.cpp:115
void SetSize(int Items)
Definition: ghost.cpp:94
int m_NumItems
Definition: ghost.h:66
int Size() const
Definition: ghost.h:81
int m_ChunkSize
Definition: ghost.h:65
void Add(const CGhostCharacter &Char)
Definition: ghost.cpp:109
CGhostPath()
Definition: ghost.h:71
void Reset(int ChunkSize=25 *60)
Definition: ghost.cpp:85
int FreeSlots() const
Definition: ghost.cpp:176
virtual void OnConsoleInit() override
Definition: ghost.cpp:578
int Load(const char *pFilename)
Definition: ghost.cpp:456
int GetSlot() const
Definition: ghost.cpp:168
class IGhostRecorder * m_pGhostRecorder
Definition: ghost.h:111
void AddInfos(const CNetObj_Character *pChar, const CNetObj_DDNetCharacter *pDDnetChar)
Definition: ghost.cpp:145
CGhostItem m_aActiveGhosts[MAX_ACTIVE_GHOSTS]
Definition: ghost.h:113
void StopRecord(int Time=-1)
Definition: ghost.cpp:401
int m_StartRenderTick
Definition: ghost.h:119
void StopRender()
Definition: ghost.cpp:450
void OnNewPredictedSnapshot()
Definition: ghost.cpp:291
virtual void OnRefreshSkins() override
Definition: ghost.cpp:650
void Unload(int Slot)
Definition: ghost.cpp:541
bool m_Rendering
Definition: ghost.h:122
bool m_RenderingStartedByServer
Definition: ghost.h:123
void TryRenderStart(int Tick, bool ServerControl)
Definition: ghost.cpp:260
virtual void OnMapLoad() override
Definition: ghost.cpp:642
class IGhostRecorder * GhostRecorder() const
Definition: ghost.h:173
virtual int Sizeof() const override
Definition: ghost.h:150
@ MAX_ACTIVE_GHOSTS
Definition: ghost.h:60
static void GetGhostSkin(CGhostSkin *pSkin, const char *pSkinName, int UseCustomColor, int ColorBody, int ColorFeet)
Definition: ghost.cpp:21
void StartRender(int Tick)
Definition: ghost.cpp:442
const char * GetGhostDir() const
Definition: ghost.h:170
void InitRenderInfos(CGhostItem *pGhost)
Definition: ghost.cpp:379
virtual void OnMessage(int MsgType, void *pRawMsg) override
Definition: ghost.cpp:586
void GetPath(char *pBuf, int Size, const char *pPlayerName, int Time=-1) const
Definition: ghost.cpp:125
char m_aTmpFilename[IO_MAX_PATH_LENGTH]
Definition: ghost.h:116
int m_NewRenderTick
Definition: ghost.h:118
void CheckStart()
Definition: ghost.cpp:185
void UnloadAll()
Definition: ghost.cpp:546
virtual void OnShutdown() override
Definition: ghost.cpp:637
static void ConGPlay(IConsole::IResult *pResult, void *pUserData)
Definition: ghost.cpp:572
int m_LastDeathTick
Definition: ghost.h:120
void CheckStartLocal(bool Predicted)
Definition: ghost.cpp:211
CGhostItem m_CurGhost
Definition: ghost.h:114
static void GetGhostCharacter(CGhostCharacter *pGhostChar, const CNetObj_Character *pChar, const CNetObj_DDNetCharacter *pDDnetChar)
Definition: ghost.cpp:29
virtual void OnNewSnapshot() override
Definition: ghost.cpp:272
virtual void OnReset() override
Definition: ghost.cpp:630
bool m_AllowRestart
Definition: ghost.h:148
void SaveGhost(CMenus::CGhostItem *pItem)
Definition: ghost.cpp:552
static const char * ms_pGhostDir
Definition: ghost.h:108
class IGhostLoader * m_pGhostLoader
Definition: ghost.h:110
static void GetNetObjCharacter(CNetObj_Character *pChar, const CGhostCharacter *pGhostChar)
Definition: ghost.cpp:50
class IGhostLoader * GhostLoader() const
Definition: ghost.h:172
bool m_Recording
Definition: ghost.h:121
virtual void OnRender() override
Definition: ghost.cpp:305
void StartRecord(int Tick)
Definition: ghost.cpp:389
@ MAX_NAME_LENGTH
Definition: protocol.h:97
@ GHOSTDATA_TYPE_START_TICK
Definition: ghost.h:19
@ GHOSTDATA_TYPE_CHARACTER_NO_TICK
Definition: ghost.h:17
@ GHOSTDATA_TYPE_CHARACTER
Definition: ghost.h:18
@ GHOSTDATA_TYPE_SKIN
Definition: ghost.h:16
int m_HookState
Definition: ghost.h:44
int m_HookY
Definition: ghost.h:46
int m_VelX
Definition: ghost.h:39
int m_HookX
Definition: ghost.h:45
int m_VelY
Definition: ghost.h:40
int m_Angle
Definition: ghost.h:41
int m_Direction
Definition: ghost.h:42
int m_X
Definition: ghost.h:37
int m_Weapon
Definition: ghost.h:43
int m_AttackTick
Definition: ghost.h:47
int m_Y
Definition: ghost.h:38
int m_Tick
Definition: ghost.h:52
int m_ColorBody
Definition: ghost.h:31
int m_Skin4
Definition: ghost.h:28
int m_Skin2
Definition: ghost.h:26
int m_Skin3
Definition: ghost.h:27
int m_UseCustomColor
Definition: ghost.h:30
int m_Skin1
Definition: ghost.h:25
int m_ColorFeet
Definition: ghost.h:32
int m_Skin5
Definition: ghost.h:29
int m_Skin0
Definition: ghost.h:24
Definition: protocol.h:455
Definition: protocol.h:513
@ IO_MAX_PATH_LENGTH
Definition: types.h:43