summaryrefslogtreecommitdiffstats
path: root/game/client/camera.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-06-25 00:44:36 +0500
committeruntodesu <kirill@untode.su>2025-06-25 00:44:36 +0500
commit88c01588aa0830e219eaa62588839e4d1e2883ce (patch)
tree602bb27dd3399aab4aae8c19630e3b7a8dac824b /game/client/camera.cc
parent99cf6cca8dbbc1e563c10cf0167432d3d8af9783 (diff)
downloadvoxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.tar.bz2
voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.zip
Clang-format the entire source code
Diffstat (limited to 'game/client/camera.cc')
-rw-r--r--game/client/camera.cc9
1 files changed, 5 insertions, 4 deletions
diff --git a/game/client/camera.cc b/game/client/camera.cc
index 30ec581..51e85ff 100644
--- a/game/client/camera.cc
+++ b/game/client/camera.cc
@@ -1,4 +1,5 @@
#include "client/pch.hh"
+
#include "client/camera.hh"
#include "core/angles.hh"
@@ -37,7 +38,7 @@ static void reset_camera(void)
// Gracefully contributed by PQCraft himself in 2024
// making PlatinumSrc and Voxelius kind of related to each other
-static glm::fmat4x4 platinumsrc_viewmatrix(const glm::fvec3 &position, const glm::fvec3 &angles)
+static glm::fmat4x4 platinumsrc_viewmatrix(const glm::fvec3& position, const glm::fvec3& angles)
{
glm::fvec3 forward, up;
cxangles::vectors(angles, &forward, nullptr, &up);
@@ -78,9 +79,9 @@ void camera::update(void)
return;
}
- const auto &head = globals::dimension->entities.get<HeadComponentIntr>(globals::player);
- const auto &transform = globals::dimension->entities.get<TransformComponentIntr>(globals::player);
- const auto &velocity = globals::dimension->entities.get<VelocityComponent>(globals::player);
+ const auto& head = globals::dimension->entities.get<HeadComponentIntr>(globals::player);
+ const auto& transform = globals::dimension->entities.get<TransformComponentIntr>(globals::player);
+ const auto& velocity = globals::dimension->entities.get<VelocityComponent>(globals::player);
camera::angles = transform.angles + head.angles;
camera::position_chunk = transform.chunk;