mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-04 18:41:51 +00:00
mini-fix
This commit is contained in:
parent
1038a79b78
commit
b2872650d6
3 changed files with 3 additions and 3 deletions
|
|
@ -92,7 +92,7 @@ void update_level(World* world, Level* level, vec3 position, float delta, long f
|
|||
}
|
||||
|
||||
Level* load_level(World* world, Player* player) {
|
||||
Level* level = new Level(world, player, new Chunks(32,1,32, 0,0,0), new PhysicsSolver(vec3(0, -gravity, 0)));
|
||||
Level* level = new Level(world, player, new Chunks(34,1,34, 0,0,0), new PhysicsSolver(vec3(0, -gravity, 0)));
|
||||
world->wfile->readPlayer(player);
|
||||
|
||||
Camera* camera = player->camera;
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ void ChunksLoader::_thread(){
|
|||
if (state == LOAD){
|
||||
chunks.putChunk(chunk);
|
||||
if (!chunk->loaded){
|
||||
WorldGenerator::generate(chunk->voxels, chunk->x, chunk->y, chunk->z, world.load()->seed);
|
||||
WorldGenerator::generate(chunk->voxels, chunk->x, chunk->y, chunk->z, world->seed);
|
||||
}
|
||||
|
||||
lighting.onChunkLoaded(chunk->x, chunk->y, chunk->z, true);
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ private:
|
|||
void _thread();
|
||||
std::atomic<Chunk*> current {nullptr};
|
||||
std::atomic<Chunk**> closes {nullptr};
|
||||
std::atomic<World*> world {nullptr};
|
||||
std::atomic<LoaderMode> state {IDLE};
|
||||
World* world;
|
||||
|
||||
void perform(Chunk* chunk, Chunk** closes_passed, LoaderMode mode);
|
||||
public:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue