mini-fix
This commit is contained in:
parent
1038a79b78
commit
b2872650d6
@ -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* 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);
|
world->wfile->readPlayer(player);
|
||||||
|
|
||||||
Camera* camera = player->camera;
|
Camera* camera = player->camera;
|
||||||
|
|||||||
@ -33,7 +33,7 @@ void ChunksLoader::_thread(){
|
|||||||
if (state == LOAD){
|
if (state == LOAD){
|
||||||
chunks.putChunk(chunk);
|
chunks.putChunk(chunk);
|
||||||
if (!chunk->loaded){
|
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);
|
lighting.onChunkLoaded(chunk->x, chunk->y, chunk->z, true);
|
||||||
|
|||||||
@ -23,8 +23,8 @@ private:
|
|||||||
void _thread();
|
void _thread();
|
||||||
std::atomic<Chunk*> current {nullptr};
|
std::atomic<Chunk*> current {nullptr};
|
||||||
std::atomic<Chunk**> closes {nullptr};
|
std::atomic<Chunk**> closes {nullptr};
|
||||||
std::atomic<World*> world {nullptr};
|
|
||||||
std::atomic<LoaderMode> state {IDLE};
|
std::atomic<LoaderMode> state {IDLE};
|
||||||
|
World* world;
|
||||||
|
|
||||||
void perform(Chunk* chunk, Chunk** closes_passed, LoaderMode mode);
|
void perform(Chunk* chunk, Chunk** closes_passed, LoaderMode mode);
|
||||||
public:
|
public:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user