diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 897fde7c6..03e0d7d5d 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -95,6 +95,7 @@ #include "GateRushComponent.h" #include "FactionTriggerComponent.h" #include "RocketLandingComponent.h" +#include "HFLightDirectionGadgetComponent.h" #include "SpawnerComponent.h" #include "PathfindingComponent.h" #include "PhysicsSystemComponent.h" @@ -987,6 +988,12 @@ void Entity::Initialize() { if (id > -1) AddComponent(id); break; } + case eReplicaComponentType::HF_LIGHT_DIRECTION_GADGET: { + // The client makes it from the registry (an editor object) + const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::HF_LIGHT_DIRECTION_GADGET, -1); + if (id > -1) AddComponent(id); + break; + } case eReplicaComponentType::ROCKET_LANDING: { // LWORocketAnimationControlComponent: the client makes it from the registry const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ROCKET_LANDING, -1); diff --git a/dGame/dComponents/HFLightDirectionGadgetComponent.h b/dGame/dComponents/HFLightDirectionGadgetComponent.h new file mode 100644 index 000000000..1b7d0cb49 --- /dev/null +++ b/dGame/dComponents/HFLightDirectionGadgetComponent.h @@ -0,0 +1,18 @@ +#ifndef HFLIGHTDIRECTIONGADGETCOMPONENT_H +#define HFLIGHTDIRECTIONGADGETCOMPONENT_H + +#include "Component.h" +#include "eReplicaComponentType.h" + +/** + * The Happy Flower editor's light direction gadget (66), as the client makes it from the registry (LOT 6968). An + * editor-only object: nothing of it is sent or done on the server. + */ +class HFLightDirectionGadgetComponent final : public Component { +public: + static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::HF_LIGHT_DIRECTION_GADGET; + + HFLightDirectionGadgetComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {} +}; + +#endif // HFLIGHTDIRECTIONGADGETCOMPONENT_H