| 1653 | |
| 1654 | |
| 1655 | void cChunkMap::AddEntity(cEntity * a_Entity) |
| 1656 | { |
| 1657 | cCSLock Lock(m_CSLayers); |
| 1658 | cChunkPtr Chunk = GetChunkNoGen(a_Entity->GetChunkX(), ZERO_CHUNK_Y, a_Entity->GetChunkZ()); |
| 1659 | if ((Chunk == NULL) && !Chunk->IsValid()) |
| 1660 | { |
| 1661 | LOGWARNING("Entity at %p (%s, ID %d) spawning in a non-existent chunk, the entity is lost.", |
| 1662 | a_Entity, a_Entity->GetClass(), a_Entity->GetUniqueID() |
| 1663 | ); |
| 1664 | return; |
| 1665 | } |
| 1666 | Chunk->AddEntity(a_Entity); |
| 1667 | } |
| 1668 | |
| 1669 | |
| 1670 |
nothing calls this directly
no test coverage detected