diff --git a/src/game/client/components/items.cpp b/src/game/client/components/items.cpp index a616f00dd..a679dd2e5 100644 --- a/src/game/client/components/items.cpp +++ b/src/game/client/components/items.cpp @@ -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); diff --git a/src/game/client/prediction/entity.h b/src/game/client/prediction/entity.h index d2e4dfeaa..d50e805ed 100644 --- a/src/game/client/prediction/entity.h +++ b/src/game/client/prediction/entity.h @@ -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;