1/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2/* If you are missing that file, acquire a complete release at teeworlds.com. */
3#ifndef GAME_CLIENT_COMPONENTS_PLAYERS_H
4#define GAME_CLIENT_COMPONENTS_PLAYERS_H
5#include <game/client/component.h>
6
7#include <game/client/render.h>
8#include <game/generated/protocol.h>
9
10class CPlayers : public CComponent
11{
12 friend class CGhost;
13
14 void RenderHand(const CTeeRenderInfo *pInfo, vec2 CenterPos, vec2 Dir, float AngleOffset, vec2 PostRotOffset, float Alpha = 1.0f);
15 void RenderPlayer(
16 const CNetObj_Character *pPrevChar,
17 const CNetObj_Character *pPlayerChar,
18 const CTeeRenderInfo *pRenderInfo,
19 int ClientId,
20 float Intra = 0.f);
21 void RenderHook(
22 const CNetObj_Character *pPrevChar,
23 const CNetObj_Character *pPlayerChar,
24 const CTeeRenderInfo *pRenderInfo,
25 int ClientId,
26 float Intra = 0.f);
27 void RenderHookCollLine(
28 const CNetObj_Character *pPrevChar,
29 const CNetObj_Character *pPlayerChar,
30 int ClientId,
31 float Intra = 0.f);
32 bool IsPlayerInfoAvailable(int ClientId) const;
33
34 int m_WeaponEmoteQuadContainerIndex;
35 int m_aWeaponSpriteMuzzleQuadContainerIndex[NUM_WEAPONS];
36
37public:
38 float GetPlayerTargetAngle(
39 const CNetObj_Character *pPrevChar,
40 const CNetObj_Character *pPlayerChar,
41 int ClientId,
42 float Intra = 0.f);
43
44 virtual int Sizeof() const override { return sizeof(*this); }
45 virtual void OnInit() override;
46 virtual void OnRender() override;
47};
48
49#endif
50