summaryrefslogtreecommitdiffstats
path: root/src/game/shared/transform.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/game/shared/transform.cc')
-rw-r--r--src/game/shared/transform.cc32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/game/shared/transform.cc b/src/game/shared/transform.cc
deleted file mode 100644
index f4b661c..0000000
--- a/src/game/shared/transform.cc
+++ /dev/null
@@ -1,32 +0,0 @@
-#include "shared/pch.hh"
-
-#include "shared/transform.hh"
-
-#include "shared/const.hh"
-#include "shared/dimension.hh"
-
-constexpr inline static void update_component(unsigned int dim, TransformComponent& 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 TransformComponent::fixed_update(Dimension* dimension)
-{
- auto view = dimension->entities.view<TransformComponent>();
-
- for(auto [entity, transform] : view.each()) {
- update_component(0U, transform);
- update_component(1U, transform);
- update_component(2U, transform);
- }
-}