MCPcopy Create free account
hub / github.com/ddnet/ddnet / InsertEntity

Method InsertEntity

src/game/server/gameworld.cpp:80–93  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

78}
79
80void CGameWorld::InsertEntity(CEntity *pEnt)
81{
82#ifdef CONF_DEBUG
83 for(CEntity *pCur = m_apFirstEntityTypes[pEnt->m_ObjType]; pCur; pCur = pCur->m_pNextTypeEntity)
84 dbg_assert(pCur != pEnt, "err");
85#endif
86
87 // insert it
88 if(m_apFirstEntityTypes[pEnt->m_ObjType])
89 m_apFirstEntityTypes[pEnt->m_ObjType]->m_pPrevTypeEntity = pEnt;
90 pEnt->m_pNextTypeEntity = m_apFirstEntityTypes[pEnt->m_ObjType];
91 pEnt->m_pPrevTypeEntity = nullptr;
92 m_apFirstEntityTypes[pEnt->m_ObjType] = pEnt;
93}
94
95void CGameWorld::RemoveEntity(CEntity *pEnt)
96{

Callers 12

CPlasmaMethod · 0.45
CProjectileMethod · 0.45
CLaserMethod · 0.45
CGunMethod · 0.45
CLightMethod · 0.45
SpawnMethod · 0.45
PauseMethod · 0.45
CPickupMethod · 0.45
CDraggerMethod · 0.45
CDoorMethod · 0.45
CDraggerBeamMethod · 0.45
TEST_FFunction · 0.45

Calls

no outgoing calls

Tested by 1

TEST_FFunction · 0.36