summaryrefslogtreecommitdiffstats
path: root/game/shared/entity/transform.cc
diff options
context:
space:
mode:
authoruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
committeruntodesu <kirill@untode.su>2025-09-11 15:48:53 +0500
commitd0fbd68055e3f4a796330cc8acc6c0954b5327ff (patch)
treee581014ea02711efa5e71f00f9862e5bca58f2ed /game/shared/entity/transform.cc
parentcbd823aa2154a956e7da4319eecbf7afc10441ae (diff)
downloadvoxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.tar.bz2
voxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.zip
Run clang-format across the project
Diffstat (limited to 'game/shared/entity/transform.cc')
-rw-r--r--game/shared/entity/transform.cc66
1 files changed, 33 insertions, 33 deletions
diff --git a/game/shared/entity/transform.cc b/game/shared/entity/transform.cc
index 379ddd5..0339b9e 100644
--- a/game/shared/entity/transform.cc
+++ b/game/shared/entity/transform.cc
@@ -1,33 +1,33 @@
-#include "shared/pch.hh"
-
-#include "shared/entity/transform.hh"
-
-#include "shared/world/dimension.hh"
-
-#include "shared/const.hh"
-
-constexpr inline static void update_component(unsigned int dim, entity::Transform& component)
-{
- if(component.local[dim] >= CHUNK_SIZE) {
- component.local[dim] -= CHUNK_SIZE;
- component.chunk[dim] += 1;
- return;
- }
-
- if(component.local[dim] < 0.0f) {
- component.local[dim] += CHUNK_SIZE;
- component.chunk[dim] -= 1;
- return;
- }
-}
-
-void entity::Transform::fixed_update(world::Dimension* dimension)
-{
- auto view = dimension->entities.view<entity::Transform>();
-
- for(auto [entity, transform] : view.each()) {
- update_component(0U, transform);
- update_component(1U, transform);
- update_component(2U, transform);
- }
-}
+#include "shared/pch.hh"
+
+#include "shared/entity/transform.hh"
+
+#include "shared/world/dimension.hh"
+
+#include "shared/const.hh"
+
+constexpr inline static void update_component(unsigned int dim, entity::Transform& component)
+{
+ if(component.local[dim] >= CHUNK_SIZE) {
+ component.local[dim] -= CHUNK_SIZE;
+ component.chunk[dim] += 1;
+ return;
+ }
+
+ if(component.local[dim] < 0.0f) {
+ component.local[dim] += CHUNK_SIZE;
+ component.chunk[dim] -= 1;
+ return;
+ }
+}
+
+void entity::Transform::fixed_update(world::Dimension* dimension)
+{
+ auto view = dimension->entities.view<entity::Transform>();
+
+ for(auto [entity, transform] : view.each()) {
+ update_component(0U, transform);
+ update_component(1U, transform);
+ update_component(2U, transform);
+ }
+}