DDraceNetwork Docs
pickup.h
Go to the documentation of this file.
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_PREDICTION_ENTITIES_PICKUP_H
4#define GAME_CLIENT_PREDICTION_ENTITIES_PICKUP_H
5
7
8class CPickupData;
9
10class CPickup : public CEntity
11{
12public:
13 static const int ms_CollisionExtraSize = 6;
14
15 void Tick() override;
16
17 CPickup(CGameWorld *pGameWorld, int Id, const CPickupData *pPickup);
18 void FillInfo(CNetObj_Pickup *pPickup);
19 bool Match(CPickup *pPickup);
20 bool InDDNetTile() { return m_IsCoreActive; }
21
22 int Type() const { return m_Type; }
23 int Subtype() const { return m_Subtype; }
24
25private:
26 int m_Type;
28
29 // DDRace
30
31 void Move();
34};
35
36#endif
Definition: entity.h:13
Definition: gameworld.h:17
Definition: pickup_data.h:13
Definition: pickup.h:11
vec2 m_Core
Definition: pickup.h:32
void Tick() override
Definition: pickup.cpp:12
void Move()
Definition: pickup.cpp:132
void FillInfo(CNetObj_Pickup *pPickup)
Definition: pickup.cpp:160
static const int ms_CollisionExtraSize
Definition: pickup.h:13
int Type() const
Definition: pickup.h:22
bool Match(CPickup *pPickup)
Definition: pickup.cpp:168
bool InDDNetTile()
Definition: pickup.h:20
CPickup(CGameWorld *pGameWorld, int Id, const CPickupData *pPickup)
Definition: pickup.cpp:147
int m_Type
Definition: pickup.h:26
int m_Subtype
Definition: pickup.h:27
bool m_IsCoreActive
Definition: pickup.h:33
int Subtype() const
Definition: pickup.h:23
Definition: protocol.h:396