about summary refs log tree commit diff
path: root/src/game/client/components/items.h
blob: 604c1b1cbcb4182e82ba6dd9b166d60ccebe14ae (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* (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_ITEMS_H
#define GAME_CLIENT_COMPONENTS_ITEMS_H
#include <game/client/component.h>

class CItems : public CComponent
{
	enum
	{
		MAX_EXTRA_PROJECTILES=32,
	};

	CNetObj_Projectile aExtraProjectiles[MAX_EXTRA_PROJECTILES];
	int ExtraProjectilesNum;

	void RenderProjectile(const CNetObj_Projectile *pCurrent, int ItemID);
	void RenderPickup(const CNetObj_Pickup *pPrev, const CNetObj_Pickup *pCurrent);
	void RenderFlag(const CNetObj_Flag *pPrev, const CNetObj_Flag *pCurrent, const CNetObj_GameData *pPrevGameData, const CNetObj_GameData *pCurGameData);
	void RenderLaser(const struct CNetObj_Laser *pCurrent);

public:
	virtual void OnReset();
	virtual void OnRender();

	void AddExtraProjectile(CNetObj_Projectile *pProj);
};

#endif