diff options
| author | untodesu <kirill@untode.su> | 2025-09-11 15:48:53 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-09-11 15:48:53 +0500 |
| commit | d0fbd68055e3f4a796330cc8acc6c0954b5327ff (patch) | |
| tree | e581014ea02711efa5e71f00f9862e5bca58f2ed /game/client/entity/factory.cc | |
| parent | cbd823aa2154a956e7da4319eecbf7afc10441ae (diff) | |
| download | voxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.tar.bz2 voxelius-d0fbd68055e3f4a796330cc8acc6c0954b5327ff.zip | |
Run clang-format across the project
Diffstat (limited to 'game/client/entity/factory.cc')
| -rw-r--r-- | game/client/entity/factory.cc | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/game/client/entity/factory.cc b/game/client/entity/factory.cc index f6f6079..5a1785a 100644 --- a/game/client/entity/factory.cc +++ b/game/client/entity/factory.cc @@ -1,30 +1,30 @@ -#include "client/pch.hh" - -#include "client/entity/factory.hh" - -#include "shared/entity/factory.hh" -#include "shared/entity/head.hh" -#include "shared/entity/transform.hh" - -#include "shared/world/dimension.hh" - -#include "client/entity/sound_emitter.hh" - -#include "client/globals.hh" - -void entity::client::create_player(world::Dimension* dimension, entt::entity entity) -{ - entity::shared::create_player(dimension, entity); - - const auto& head = dimension->entities.get<entity::Head>(entity); - dimension->entities.emplace_or_replace<entity::client::HeadIntr>(entity, head); - dimension->entities.emplace_or_replace<entity::client::HeadPrev>(entity, head); - - const auto& transform = dimension->entities.get<entity::Transform>(entity); - dimension->entities.emplace_or_replace<entity::client::TransformIntr>(entity, transform); - dimension->entities.emplace_or_replace<entity::client::TransformPrev>(entity, transform); - - if(globals::sound_ctx) { - dimension->entities.emplace_or_replace<entity::SoundEmitter>(entity); - } -} +#include "client/pch.hh"
+
+#include "client/entity/factory.hh"
+
+#include "shared/entity/factory.hh"
+#include "shared/entity/head.hh"
+#include "shared/entity/transform.hh"
+
+#include "shared/world/dimension.hh"
+
+#include "client/entity/sound_emitter.hh"
+
+#include "client/globals.hh"
+
+void entity::client::create_player(world::Dimension* dimension, entt::entity entity)
+{
+ entity::shared::create_player(dimension, entity);
+
+ const auto& head = dimension->entities.get<entity::Head>(entity);
+ dimension->entities.emplace_or_replace<entity::client::HeadIntr>(entity, head);
+ dimension->entities.emplace_or_replace<entity::client::HeadPrev>(entity, head);
+
+ const auto& transform = dimension->entities.get<entity::Transform>(entity);
+ dimension->entities.emplace_or_replace<entity::client::TransformIntr>(entity, transform);
+ dimension->entities.emplace_or_replace<entity::client::TransformPrev>(entity, transform);
+
+ if(globals::sound_ctx) {
+ dimension->entities.emplace_or_replace<entity::SoundEmitter>(entity);
+ }
+}
|
