MCPcopy Create free account
hub / github.com/cuberite/cuberite / AddEntity

Method AddEntity

src/Chunk.cpp:1861–1871  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1859
1860
1861void cChunk::AddEntity(cEntity * a_Entity)
1862{
1863 if (!a_Entity->IsPlayer())
1864 {
1865 MarkDirty();
1866 }
1867
1868 ASSERT(std::find(m_Entities.begin(), m_Entities.end(), a_Entity) == m_Entities.end()); // Not there already
1869
1870 m_Entities.push_back(a_Entity);
1871}
1872
1873
1874

Callers 1

MoveEntityToNewChunkMethod · 0.45

Calls 3

IsPlayerMethod · 0.80
beginMethod · 0.80
endMethod · 0.80

Tested by

no test coverage detected