return chunks.ForceLoad(player->ChunkCoords());
}
-Chunk &World::Next(const Chunk &to, const glm::tvec3<int> &dir) {
+Chunk &World::Next(const Chunk &to, const glm::ivec3 &dir) {
const Chunk::Pos tgt_pos = to.Position() + dir;
return chunks.ForceLoad(tgt_pos);
}
Resolve(entity, col);
}
}
+ for (auto iter = entities.begin(), end = entities.end(); iter != end;) {
+ if (iter->CanRemove()) {
+ iter = entities.erase(iter);
+ } else {
+ ++iter;
+ }
+ }
chunks.Rebase(player->ChunkCoords());
chunks.Update(dt);
}