diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 62c21e49e..9b0f26573 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -90,6 +90,7 @@ #include "CollectibleComponent.h" #include "ItemComponent.h" #include "MinifigComponent.h" +#include "FactionTriggerComponent.h" #include "RocketLandingComponent.h" #include "GenericActivatorComponent.h" #include "ShowcaseModelHandlerComponent.h" @@ -1078,6 +1079,12 @@ void Entity::Initialize() { if (id > -1) AddComponent(id); break; } + case eReplicaComponentType::FACTION_TRIGGER: { + // LWOFactionTriggerComponent: the client makes it from the registry + const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::FACTION_TRIGGER, -1); + if (id > -1) AddComponent(id); + break; + } default: break; } diff --git a/dGame/dComponents/FactionTriggerComponent.h b/dGame/dComponents/FactionTriggerComponent.h new file mode 100644 index 000000000..d2bb5b30d --- /dev/null +++ b/dGame/dComponents/FactionTriggerComponent.h @@ -0,0 +1,17 @@ +#ifndef FACTIONTRIGGERCOMPONENT_H +#define FACTIONTRIGGERCOMPONENT_H + +#include "Component.h" +#include "eReplicaComponentType.h" + +/** + * Faction trigger, as the client's LWOFactionTriggerComponent makes it from the registry. Nothing of it is sent or done on the server yet. + */ +class FactionTriggerComponent final : public Component { +public: + static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::FACTION_TRIGGER; + + FactionTriggerComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {} +}; + +#endif // FACTIONTRIGGERCOMPONENT_H