mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2024-12-22 13:33:35 +00:00
chore: rename zonecontrolcomp to minigamecontrolcomp
This commit is contained in:
parent
3d85f6639e
commit
1f399a7277
@ -54,7 +54,7 @@ enum class eReplicaComponentType : uint32_t {
|
||||
PHYSICS_SYSTEM,
|
||||
QUICK_BUILD,
|
||||
SWITCH,
|
||||
ZONE_CONTROL, // Minigame
|
||||
MINI_GAME_CONTROL,
|
||||
CHANGLING,
|
||||
CHOICE_BUILD,
|
||||
PACKAGE,
|
||||
|
@ -76,7 +76,7 @@
|
||||
#include "eGameMasterLevel.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
#include "eReplicaPacketType.h"
|
||||
#include "ZoneControlComponent.h"
|
||||
#include "MiniGameControlComponent.h"
|
||||
#include "RacingStatsComponent.h"
|
||||
#include "CollectibleComponent.h"
|
||||
#include "ItemComponent.h"
|
||||
@ -217,8 +217,8 @@ void Entity::Initialize() {
|
||||
AddComponent<PetComponent>(petComponentId);
|
||||
}
|
||||
|
||||
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::ZONE_CONTROL) > 0) {
|
||||
AddComponent<ZoneControlComponent>();
|
||||
if (compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::MINI_GAME_CONTROL) > 0) {
|
||||
AddComponent<MiniGameControlComponent>();
|
||||
}
|
||||
|
||||
uint32_t possessableComponentId = compRegistryTable->GetByIDAndType(m_TemplateID, eReplicaComponentType::POSSESSABLE);
|
||||
@ -1197,9 +1197,9 @@ void Entity::WriteComponents(RakNet::BitStream* outBitStream, eReplicaPacketType
|
||||
}
|
||||
}
|
||||
|
||||
ZoneControlComponent* zoneControlComponent;
|
||||
if (TryGetComponent(eReplicaComponentType::ZONE_CONTROL, zoneControlComponent)) {
|
||||
zoneControlComponent->Serialize(outBitStream, bIsInitialUpdate);
|
||||
MiniGameControlComponent* miniGameControlComponent;
|
||||
if (TryGetComponent(eReplicaComponentType::MINI_GAME_CONTROL, miniGameControlComponent)) {
|
||||
miniGameControlComponent->Serialize(outBitStream, bIsInitialUpdate);
|
||||
}
|
||||
|
||||
// BBB Component, unused currently
|
||||
|
@ -45,6 +45,6 @@ set(DGAME_DCOMPONENTS_SOURCES "BaseCombatAIComponent.cpp"
|
||||
"TriggerComponent.cpp"
|
||||
"HavokVehiclePhysicsComponent.cpp"
|
||||
"VendorComponent.cpp"
|
||||
"ZoneControlComponent.cpp"
|
||||
"MiniGameControlComponent.cpp"
|
||||
PARENT_SCOPE
|
||||
)
|
||||
|
5
dGame/dComponents/MiniGameControlComponent.cpp
Normal file
5
dGame/dComponents/MiniGameControlComponent.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "MiniGameControlComponent.h"
|
||||
|
||||
void MiniGameControlComponent::Serialize(RakNet::BitStream* outBitStream, bool isConstruction) {
|
||||
outBitStream->Write<uint32_t>(0x40000000);
|
||||
}
|
15
dGame/dComponents/MiniGameControlComponent.h
Normal file
15
dGame/dComponents/MiniGameControlComponent.h
Normal file
@ -0,0 +1,15 @@
|
||||
#ifndef __MINIGAMECONTROLCOMPONENT__H__
|
||||
#define __MINIGAMECONTROLCOMPONENT__H__
|
||||
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
class MiniGameControlComponent final : public Component {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::MINI_GAME_CONTROL;
|
||||
|
||||
MiniGameControlComponent(Entity* parent) : Component(parent) {}
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool isConstruction);
|
||||
};
|
||||
|
||||
#endif //!__MINIGAMECONTROLCOMPONENT__H__
|
5
dGame/dComponents/MinigameComponent.cpp
Normal file
5
dGame/dComponents/MinigameComponent.cpp
Normal file
@ -0,0 +1,5 @@
|
||||
#include "MinigameComponent.h"
|
||||
|
||||
void MinigameComponent::Serialize(RakNet::BitStream* outBitStream, bool isConstruction) {
|
||||
outBitStream->Write<uint32_t>(0x40000000);
|
||||
}
|
@ -1,5 +0,0 @@
|
||||
#include "ZoneControlComponent.h"
|
||||
|
||||
void ZoneControlComponent::Serialize(RakNet::BitStream* outBitStream, bool isConstruction) {
|
||||
outBitStream->Write<uint32_t>(0x40000000);
|
||||
}
|
@ -1,15 +0,0 @@
|
||||
#ifndef __ZONECONTROLCOMPONENT__H__
|
||||
#define __ZONECONTROLCOMPONENT__H__
|
||||
|
||||
#include "Component.h"
|
||||
#include "eReplicaComponentType.h"
|
||||
|
||||
class ZoneControlComponent final : public Component {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::ZONE_CONTROL;
|
||||
|
||||
ZoneControlComponent(Entity* parent) : Component(parent) {}
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool isConstruction);
|
||||
};
|
||||
|
||||
#endif //!__ZONECONTROLCOMPONENT__H__
|
Loading…
Reference in New Issue
Block a user