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_ITEMS_H
|
|
|
|
#define GAME_CLIENT_COMPONENTS_ITEMS_H
|
|
|
|
#include <game/client/component.h>
|
|
|
|
|
|
|
|
class CItems : public CComponent
|
2011-04-13 18:37:12 +00:00
|
|
|
{
|
2011-04-03 08:11:23 +00:00
|
|
|
enum
|
|
|
|
{
|
|
|
|
MAX_EXTRA_PROJECTILES=32,
|
|
|
|
};
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-09-06 13:27:56 +00:00
|
|
|
CNetObj_Projectile m_aExtraProjectiles[MAX_EXTRA_PROJECTILES];
|
|
|
|
int m_NumExtraProjectiles;
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-02-12 10:40:36 +00:00
|
|
|
void RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID);
|
2019-06-18 01:05:34 +00:00
|
|
|
void RenderPickup(const CNetObj_Pickup *pPrev, const CNetObj_Pickup *pCurrent, bool IsPredicted = false);
|
2011-03-04 16:08:10 +00:00
|
|
|
void RenderFlag(const CNetObj_Flag *pPrev, const CNetObj_Flag *pCurrent, const CNetObj_GameData *pPrevGameData, const CNetObj_GameData *pCurGameData);
|
2019-04-11 22:46:54 +00:00
|
|
|
void RenderLaser(const struct CNetObj_Laser *pCurrent, bool IsPredicted = false);
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2018-03-13 20:52:44 +00:00
|
|
|
int m_ItemsQuadContainerIndex;
|
2010-05-29 07:25:38 +00:00
|
|
|
public:
|
2011-04-03 08:11:23 +00:00
|
|
|
virtual void OnReset();
|
2010-05-29 07:25:38 +00:00
|
|
|
virtual void OnRender();
|
2018-03-13 20:52:44 +00:00
|
|
|
virtual void OnInit();
|
2011-04-13 18:37:12 +00:00
|
|
|
|
2011-04-03 08:11:23 +00:00
|
|
|
void AddExtraProjectile(CNetObj_Projectile *pProj);
|
2019-04-11 22:46:54 +00:00
|
|
|
|
2020-05-01 14:29:06 +00:00
|
|
|
void ReconstructSmokeTrail(const CNetObj_Projectile *pCurrent, int ItemID, int DestroyTick);
|
2010-05-29 07:25:38 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|