ddnet/src/game/client/components/damageind.h
heinrich5991 1820a0e168 Add some checksum functions to the client
Let's see if it works out, if not, we can revert it.
2022-01-31 21:31:26 +01:00

42 lines
865 B
C++

/* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
/* If you are missing that file, acquire a complete release at teeworlds.com. */
#ifndef GAME_CLIENT_COMPONENTS_DAMAGEIND_H
#define GAME_CLIENT_COMPONENTS_DAMAGEIND_H
#include <base/vmath.h>
#include <game/client/component.h>
class CDamageInd : public CComponent
{
int64_t m_Lastupdate;
struct CItem
{
vec2 m_Pos;
vec2 m_Dir;
float m_StartTime;
float m_StartAngle;
};
enum
{
MAX_ITEMS = 64,
};
CItem m_aItems[MAX_ITEMS];
int m_NumItems;
CItem *CreateI();
void DestroyI(CItem *i);
int m_DmgIndQuadContainerIndex;
public:
CDamageInd();
virtual int Sizeof() const override { return sizeof(*this); }
void Create(vec2 Pos, vec2 Dir);
void Reset();
virtual void OnRender() override;
virtual void OnInit() override;
};
#endif