diff --git a/res/block.png b/res/block.png index cf25628e..b8967786 100644 Binary files a/res/block.png and b/res/block.png differ diff --git a/src/voxel_engine.cpp b/src/voxel_engine.cpp index 3f6f9841..3612717d 100644 --- a/src/voxel_engine.cpp +++ b/src/voxel_engine.cpp @@ -118,7 +118,7 @@ void update_controls(PhysicsSolver* physics, substeps = (substeps <= 0 ? 1 : (substeps > 100 ? 100 : substeps)); physics->step(chunks, hitbox, delta, substeps, shift, player->flight ? 0.0f : 1.0f); camera->position.x = hitbox->position.x; - camera->position.y = hitbox->position.y + 0.5f; + camera->position.y = hitbox->position.y + 0.7f; camera->position.z = hitbox->position.z; if (player->flight && hitbox->grounded) @@ -245,6 +245,12 @@ void update_interaction(Chunks* chunks, PhysicsSolver* physics, Player* player, lighting->onBlockSet(x,y,z, player->choosenBlock); } } + if (Events::jclicked(GLFW_MOUSE_BUTTON_3)){ + int x = (int)iend.x; + int y = (int)iend.y; + int z = (int)iend.z; + player->choosenBlock = chunks->get(x,y,z)->id; + } } } diff --git a/src/voxels/WorldGenerator.cpp b/src/voxels/WorldGenerator.cpp index 60938091..9d6d5afc 100644 --- a/src/voxels/WorldGenerator.cpp +++ b/src/voxels/WorldGenerator.cpp @@ -135,7 +135,7 @@ void WorldGenerator::generate(voxel* voxels, int cx, int cy, int cz){ // id = 10; // } - if ( ((height - (1.5 - 0.2 * pow(height - 55, 4))) < real_y) && (real_y < height)){ + if ( ((height - (1.5 - 0.2 * pow(height - 54, 4))) < real_y) && (real_y < height)){ id = 10; } if (real_y <= 2)