diff --git a/dGame/Entity.cpp b/dGame/Entity.cpp index 2748e96dc..96b9f14d0 100644 --- a/dGame/Entity.cpp +++ b/dGame/Entity.cpp @@ -95,6 +95,7 @@ #include "GateRushComponent.h" #include "FactionTriggerComponent.h" #include "RocketLandingComponent.h" +#include "ProjectilePhysicsComponent.h" #include "GenericActivatorComponent.h" #include "ShowcaseModelHandlerComponent.h" #include "CustomBuildAssemblyComponent.h" @@ -985,6 +986,12 @@ void Entity::Initialize() { if (id > -1) AddComponent(id); break; } + case eReplicaComponentType::PROJECTILE_PHYSICS: { + // LWOProjectilePhysicsComponent: the client makes it from the registry + const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::PROJECTILE_PHYSICS, -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/ProjectilePhysicsComponent.h b/dGame/dComponents/ProjectilePhysicsComponent.h new file mode 100644 index 000000000..86ae52c7f --- /dev/null +++ b/dGame/dComponents/ProjectilePhysicsComponent.h @@ -0,0 +1,17 @@ +#ifndef PROJECTILEPHYSICSCOMPONENT_H +#define PROJECTILEPHYSICSCOMPONENT_H + +#include "Component.h" +#include "eReplicaComponentType.h" + +/** + * Projectile physics, as LWOProjectilePhysicsComponent makes it from the registry. Nothing of it is sent or done on the server yet. + */ +class ProjectilePhysicsComponent final : public Component { +public: + static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::PROJECTILE_PHYSICS; + + ProjectilePhysicsComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {} +}; + +#endif // PROJECTILEPHYSICSCOMPONENT_H