mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-07 12:01:50 +00:00
EngineSettings: chunksLoadDistance, chunksPadding
This commit is contained in:
parent
26935473a3
commit
01eb264f44
12 changed files with 79 additions and 53 deletions
|
|
@ -36,14 +36,14 @@ void World::write(Level* level) {
|
|||
wfile->writePlayer(level->player);
|
||||
}
|
||||
|
||||
Level* World::loadLevel(Player* player) {
|
||||
Level* World::loadLevel(Player* player, uint loadDistance, uint chunksPadding) {
|
||||
ChunksStorage* storage = new ChunksStorage();
|
||||
LevelEvents* events = new LevelEvents();
|
||||
Level* level = new Level(this, player, new Chunks(16, 16, 0, 0, events), storage, new PhysicsSolver(vec3(0, -19.6f, 0)), events);
|
||||
Level* level = new Level(this, player, storage, events, loadDistance, chunksPadding);
|
||||
wfile->readPlayer(player);
|
||||
|
||||
Camera* camera = player->camera;
|
||||
camera->rotation = mat4(1.0f);
|
||||
camera->rotate(player->camY, player->camX, 0);
|
||||
return level;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue