From f40d09cb8f712e87691af4912f3630d92d692779 Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Dec 2025 15:14:26 +0500 Subject: Shuffle stuff around - Use the new and improved hierarchy I figured out when making Prospero chat - Re-add NSIS scripts, again from Prospero - Update most build and utility scripts with their most recent versions --- src/game/client/entity/factory.cc | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 src/game/client/entity/factory.cc (limited to 'src/game/client/entity/factory.cc') diff --git a/src/game/client/entity/factory.cc b/src/game/client/entity/factory.cc new file mode 100644 index 0000000..f6f6079 --- /dev/null +++ b/src/game/client/entity/factory.cc @@ -0,0 +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); + 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); + + if(globals::sound_ctx) { + dimension->entities.emplace_or_replace(entity); + } +} -- cgit