micro fix

This commit is contained in:
lllzebralll 2022-06-28 19:03:01 +03:00
parent 0aa891f35f
commit 4e5869882e
3 changed files with 8 additions and 2 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

After

Width:  |  Height:  |  Size: 258 KiB

View File

@ -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;
}
}
}

View File

@ -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)