mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 01:58:19 +00:00
prediction/entity: Sync ID getter name with the server/entity
This commit is contained in:
parent
1f264a042d
commit
5169369809
|
@ -334,7 +334,7 @@ void CItems::OnRender()
|
|||
continue;
|
||||
|
||||
CProjectileData Data = pProj->GetData();
|
||||
RenderProjectile(&Data, pProj->ID());
|
||||
RenderProjectile(&Data, pProj->GetID());
|
||||
}
|
||||
for(CEntity *pEnt = GameClient()->m_PredictedWorld.FindFirst(CGameWorld::ENTTYPE_LASER); pEnt; pEnt = pEnt->NextEntity())
|
||||
{
|
||||
|
@ -352,7 +352,7 @@ void CItems::OnRender()
|
|||
|
||||
if(pPickup->InDDNetTile())
|
||||
{
|
||||
if(auto *pPrev = (CPickup *)GameClient()->m_PrevPredictedWorld.GetEntity(pPickup->ID(), CGameWorld::ENTTYPE_PICKUP))
|
||||
if(auto *pPrev = (CPickup *)GameClient()->m_PrevPredictedWorld.GetEntity(pPickup->GetID(), CGameWorld::ENTTYPE_PICKUP))
|
||||
{
|
||||
CNetObj_Pickup Data, Prev;
|
||||
pPickup->FillInfo(&Data);
|
||||
|
|
|
@ -35,6 +35,8 @@ protected:
|
|||
int m_ObjType;
|
||||
|
||||
public:
|
||||
int GetID() const { return m_ID; }
|
||||
|
||||
CEntity(CGameWorld *pGameWorld, int Objtype, vec2 Pos = vec2(0, 0), int ProximityRadius = 0);
|
||||
virtual ~CEntity();
|
||||
|
||||
|
@ -64,7 +66,6 @@ public:
|
|||
CEntity *m_pParent;
|
||||
CEntity *m_pChild;
|
||||
CEntity *NextEntity() { return m_pNextTypeEntity; }
|
||||
int ID() { return m_ID; }
|
||||
void Keep()
|
||||
{
|
||||
m_SnapTicks = 0;
|
||||
|
|
Loading…
Reference in a new issue