mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-11-20 10:45:27 +00:00
feat(entity): the client's spawner component (10) on spawner objects
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -95,6 +95,7 @@
|
|||||||
#include "GateRushComponent.h"
|
#include "GateRushComponent.h"
|
||||||
#include "FactionTriggerComponent.h"
|
#include "FactionTriggerComponent.h"
|
||||||
#include "RocketLandingComponent.h"
|
#include "RocketLandingComponent.h"
|
||||||
|
#include "SpawnerComponent.h"
|
||||||
#include "PathfindingComponent.h"
|
#include "PathfindingComponent.h"
|
||||||
#include "PhysicsSystemComponent.h"
|
#include "PhysicsSystemComponent.h"
|
||||||
#include "VehiclePhysicsComponent.h"
|
#include "VehiclePhysicsComponent.h"
|
||||||
@@ -1020,6 +1021,12 @@ void Entity::Initialize() {
|
|||||||
if (id > -1) AddComponent<PhysicsSystemComponent>(id);
|
if (id > -1) AddComponent<PhysicsSystemComponent>(id);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case eReplicaComponentType::SPAWNER: {
|
||||||
|
// A spawner object's spawner component, from the registry as the client makes it
|
||||||
|
const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::SPAWNER, -1);
|
||||||
|
if (id > -1) AddComponent<SpawnerComponent>(id);
|
||||||
|
break;
|
||||||
|
}
|
||||||
case eReplicaComponentType::ROCKET_LANDING: {
|
case eReplicaComponentType::ROCKET_LANDING: {
|
||||||
// LWORocketAnimationControlComponent: the client makes it from the registry
|
// LWORocketAnimationControlComponent: the client makes it from the registry
|
||||||
const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ROCKET_LANDING, -1);
|
const auto id = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ROCKET_LANDING, -1);
|
||||||
|
|||||||
17
dGame/dComponents/SpawnerComponent.h
Normal file
17
dGame/dComponents/SpawnerComponent.h
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#ifndef SPAWNERCOMPONENT_H
|
||||||
|
#define SPAWNERCOMPONENT_H
|
||||||
|
|
||||||
|
#include "Component.h"
|
||||||
|
#include "eReplicaComponentType.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The spawner component (10) of a spawner object (LOT 176), made from the registry as the client makes it.
|
||||||
|
*/
|
||||||
|
class SpawnerComponent final : public Component {
|
||||||
|
public:
|
||||||
|
static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::SPAWNER;
|
||||||
|
|
||||||
|
SpawnerComponent(Entity* parent, const int32_t componentID) : Component(parent, componentID) {}
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // SPAWNERCOMPONENT_H
|
||||||
Reference in New Issue
Block a user