From 912f5998ae854f91c7b4b824ddeacba9d0e4bc15 Mon Sep 17 00:00:00 2001 From: Aaron Kimbrell Date: Thu, 1 Oct 2026 07:03:00 -0500 Subject: [PATCH] feat(entity): the client's spring pad component (41) Co-Authored-By: Claude Opus 5.5 --- dGame/Entity.cpp | 7 +++++++ dGame/dComponents/SpringpadComponent.h | 17 +++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 dGame/dComponents/SpringpadComponent.h diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 56961c51b..d70a31754 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -90,6 +90,7 @@ #include "CollectibleComponent.h" #include "ItemComponent.h" #include "MinifigComponent.h" +#include "SpringpadComponent.h" #include "ModelBuilderComponent.h" #include "ArcadeComponent.h" #include "ModuleComponent.h" @@ -1022,6 +1023,12 @@ void Entity::Initialize() { if (id > -1) AddComponent(id); break; } + case eReplicaComponentType::SPRINGPAD: { + // LWOSpringpadComponent: the client makes it from the registry + const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::SPRINGPAD, -1); + if (id > -1) AddComponent(id); + break; + } default: break; } diff --git a/dGame/dComponents/SpringpadComponent.h b/dGame/dComponents/SpringpadComponent.h new file mode 100644 index 000000000..14ab93d87 --- /dev/null +++ b/dGame/dComponents/SpringpadComponent.h @@ -0,0 +1,17 @@ +#ifndef SPRINGPADCOMPONENT_H +#define SPRINGPADCOMPONENT_H + +#include "Component.h" +#include "eReplicaComponentType.h" + +/** + * Spring pad, as the client's LWOSpringpadComponent makes it from the registry. Nothing of it is sent or done on the server yet. + */ +class SpringpadComponent final : public Component { +public: + static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SPRINGPAD; + + SpringpadComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {} +}; + +#endif // SPRINGPADCOMPONENT_H