Skip to content

Commit

Permalink
tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
Jukitsu committed Jul 4, 2024
1 parent 8d85204 commit 9f45806
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Jukcraft/src/core/Window.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ namespace Jukcraft {
glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 6);
glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
glfwWindowHint(GLFW_SAMPLES, 4);
handle = glfwCreateWindow(width, height, "Minecraft clone", nullptr, nullptr);
handle = glfwCreateWindow(width, height, "Jukcraft", nullptr, nullptr);

glfwMakeContextCurrent(handle);
glfwSetWindowUserPointer(handle, this);
Expand Down
10 changes: 5 additions & 5 deletions Jukcraft/src/entity/LivingEntity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ namespace Jukcraft {

LivingEntity::LivingEntity(World& world, const glm::vec3& initialPos, const glm::vec3& initialVelocity,
float initialYaw, float initialPitch, float width, float height)
:Entity(initialPos, initialVelocity, initialYaw, initialPitch, width * width * height),
:Entity(initialPos, initialVelocity, initialYaw, initialPitch, width * width * height),
oldPosition(position), interpolatedPos(position), interpolationStep(1.0f),
width(0.6f), height(1.8f), collider(), world(world), onGround(false), speed(WALK_SPEED) {
width(width), height(height), collider(), world(world), onGround(false), speed(WALK_SPEED) {
collider.vx1 = position - glm::vec3(width / 2.0f, 0, width / 2.0f);
collider.vx2 = position + glm::vec3(width / 2.0f, height, width / 2.0f);
}
Expand Down Expand Up @@ -70,8 +70,8 @@ namespace Jukcraft {

auto it = std::min_element(potentialCollisions.begin(), potentialCollisions.end(), [](auto&& a, auto&& b) {
return a.entryTime < b.entryTime;
});

});
auto&& [entryTime, normal] = *it;

entryTime -= 0.001f;
Expand Down Expand Up @@ -121,7 +121,7 @@ namespace Jukcraft {

setInput(glm::ivec3(0));
}


updateCollider();

Expand Down

0 comments on commit 9f45806

Please sign in to comment.