From 3bf42c6ff3805a0d42bbc661794a95ff31bedc26 Mon Sep 17 00:00:00 2001 From: untodesu Date: Sat, 15 Mar 2025 16:22:09 +0500 Subject: Add whatever I was working on for the last month --- game/client/factory.cc | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 game/client/factory.cc (limited to 'game/client/factory.cc') diff --git a/game/client/factory.cc b/game/client/factory.cc new file mode 100644 index 0000000..636cf35 --- /dev/null +++ b/game/client/factory.cc @@ -0,0 +1,24 @@ +#include "client/pch.hh" +#include "client/factory.hh" + +#include "shared/dimension.hh" +#include "shared/factory.hh" +#include "shared/head.hh" +#include "shared/transform.hh" + +#include "client/sound_emitter.hh" + +void client_factory::create_player(Dimension *dimension, entt::entity entity) +{ + shared_factory::create_player(dimension, entity); + + const auto &head = dimension->entities.get(entity); + dimension->entities.emplace_or_replace(entity, head); + dimension->entities.emplace_or_replace(entity, head); + + const auto &transform = dimension->entities.get(entity); + dimension->entities.emplace_or_replace(entity, transform); + dimension->entities.emplace_or_replace(entity, transform); + + dimension->entities.emplace_or_replace(entity); +} -- cgit