ddnet/src/game/client/components/killmessages.h

66 lines
1.4 KiB
C
Raw Normal View History

2010-11-20 10:37:14 +00:00
/* (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. */
2010-05-29 07:25:38 +00:00
#ifndef GAME_CLIENT_COMPONENTS_KILLMESSAGES_H
#define GAME_CLIENT_COMPONENTS_KILLMESSAGES_H
#include <game/client/component.h>
2021-07-12 09:29:59 +00:00
#include <game/client/render.h>
2010-05-29 07:25:38 +00:00
class CKillMessages : public CComponent
{
int m_SpriteQuadContainerIndex;
2010-05-29 07:25:38 +00:00
public:
// kill messages
struct CKillMsg
{
CKillMsg()
{
m_KillerTextContainerIndex = m_VictimTextContainerIndex = -1;
}
2010-05-29 07:25:38 +00:00
int m_Weapon;
int m_VictimID;
int m_VictimTeam;
int m_VictimDDTeam;
char m_aVictimName[64];
int m_VictimTextContainerIndex;
float m_VitctimTextWidth;
CTeeRenderInfo m_VictimRenderInfo;
int m_KillerID;
int m_KillerTeam;
char m_aKillerName[64];
int m_KillerTextContainerIndex;
float m_KillerTextWidth;
CTeeRenderInfo m_KillerRenderInfo;
2010-05-29 07:25:38 +00:00
int m_ModeSpecial; // for CTF, if the guy is carrying a flag for example
int m_Tick;
2019-07-29 14:36:44 +00:00
int m_FlagCarrierBlue;
2010-05-29 07:25:38 +00:00
};
2010-05-29 07:25:38 +00:00
enum
{
MAX_KILLMSGS = 5,
};
2020-12-13 00:08:34 +00:00
private:
void CreateKillmessageNamesIfNotCreated(CKillMsg &Kill);
public:
2010-05-29 07:25:38 +00:00
CKillMsg m_aKillmsgs[MAX_KILLMSGS];
int m_KillmsgCurrent;
virtual void OnWindowResize();
2010-05-29 07:25:38 +00:00
virtual void OnReset();
virtual void OnRender();
virtual void OnMessage(int MsgType, void *pRawMsg);
virtual void OnInit();
2020-11-08 05:39:16 +00:00
void RefindSkins();
2010-05-29 07:25:38 +00:00
};
#endif