mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
prediction/entity: Sync constructor signature, add GetProximityRadius()
This commit is contained in:
parent
a5f4c66fd5
commit
a023671ecd
|
@ -6,12 +6,13 @@
|
|||
//////////////////////////////////////////////////
|
||||
// Entity
|
||||
//////////////////////////////////////////////////
|
||||
CEntity::CEntity(CGameWorld *pGameWorld, int ObjType)
|
||||
CEntity::CEntity(CGameWorld *pGameWorld, int ObjType, vec2 Pos, int ProximityRadius)
|
||||
{
|
||||
m_pGameWorld = pGameWorld;
|
||||
|
||||
m_ObjType = ObjType;
|
||||
m_ProximityRadius = 0;
|
||||
m_Pos = Pos;
|
||||
m_ProximityRadius = ProximityRadius;
|
||||
|
||||
m_MarkedForDestroy = false;
|
||||
m_ID = -1;
|
||||
|
|
|
@ -38,7 +38,7 @@ protected:
|
|||
int m_ObjType;
|
||||
|
||||
public:
|
||||
CEntity(CGameWorld *pGameWorld, int Objtype);
|
||||
CEntity(CGameWorld *pGameWorld, int Objtype, vec2 Pos = vec2(0, 0), int ProximityRadius = 0);
|
||||
virtual ~CEntity();
|
||||
|
||||
class CGameWorld *GameWorld() { return m_pGameWorld; }
|
||||
|
@ -48,6 +48,7 @@ public:
|
|||
class CCollision *Collision() { return GameWorld()->Collision(); }
|
||||
CEntity *TypeNext() { return m_pNextTypeEntity; }
|
||||
CEntity *TypePrev() { return m_pPrevTypeEntity; }
|
||||
float GetProximityRadius() const { return m_ProximityRadius; }
|
||||
|
||||
void Destroy() { delete this; }
|
||||
virtual void Tick() {}
|
||||
|
|
Loading…
Reference in a new issue