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