summaryrefslogtreecommitdiffstats
path: root/game/shared/stasis.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/shared/stasis.cc
parent99cf6cca8dbbc1e563c10cf0167432d3d8af9783 (diff)
downloadvoxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.tar.bz2
voxelius-88c01588aa0830e219eaa62588839e4d1e2883ce.zip
Clang-format the entire source code
Diffstat (limited to 'game/shared/stasis.cc')
-rw-r--r--game/shared/stasis.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/game/shared/stasis.cc b/game/shared/stasis.cc
index 4e474af..462871d 100644
--- a/game/shared/stasis.cc
+++ b/game/shared/stasis.cc
@@ -1,16 +1,19 @@
#include "shared/pch.hh"
+
#include "shared/stasis.hh"
#include "shared/dimension.hh"
#include "shared/transform.hh"
-void StasisComponent::fixed_update(Dimension *dimension)
+void StasisComponent::fixed_update(Dimension* dimension)
{
auto view = dimension->entities.view<TransformComponent>();
for(auto [entity, transform] : view.each()) {
- if(dimension->find_chunk(transform.chunk))
+ if(dimension->find_chunk(transform.chunk)) {
dimension->entities.remove<StasisComponent>(entity);
- else dimension->entities.emplace_or_replace<StasisComponent>(entity);
+ } else {
+ dimension->entities.emplace_or_replace<StasisComponent>(entity);
+ }
}
}