Merge remote-tracking branch 'origin/main'

This commit is contained in:
InfiniteCoder 2024-08-04 22:04:23 +03:00
commit f837bc5158
2 changed files with 4 additions and 3 deletions

View File

@ -260,7 +260,7 @@ void PlayerController::postUpdate(float delta, bool input, bool pause) {
camControl.updateMouse(this->input);
}
player->postUpdate();
camControl.update(this->input, delta, level->chunks.get());
camControl.update(this->input, pause ? 0.0f : delta, level->chunks.get());
if (input) {
updateInteraction();
} else {

View File

@ -38,6 +38,7 @@ struct EntityId {
};
struct Transform {
static inline constexpr float EPSILON = 0.0000001f;
glm::vec3 pos;
glm::vec3 size;
glm::mat3 rot;
@ -55,14 +56,14 @@ struct Transform {
}
inline void setSize(glm::vec3 v) {
if (glm::distance2(displaySize, v) >= 0.00001f) {
if (glm::distance2(displaySize, v) >= EPSILON) {
dirty = true;
}
size = v;
}
inline void setPos(glm::vec3 v) {
if (glm::distance2(displayPos, v) >= 0.0001f) {
if (glm::distance2(displayPos, v) >= EPSILON) {
dirty = true;
}
pos = v;