mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-08-06 10:44:08 +00:00
Entity work
- Add in bool cheks - Fix component class files so they compile and link - Fin inheritance
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
#include "BaseRacingControlComponent.h"
|
||||
|
||||
BaseRacingControlComponent::BaseRacingControlComponent(Entity* parent) : Component(parent) {
|
||||
BaseRacingControlComponent::BaseRacingControlComponent(Entity* parent, int32_t componentId) : ScriptedActivityComponent(parent, componentId) {
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ class Entity;
|
||||
class BaseRacingControlComponent : public ScriptedActivityComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
||||
BaseRacingControlComponent(Entity* parent);
|
||||
BaseRacingControlComponent(Entity* parent, int32_t componentId);
|
||||
};
|
||||
|
||||
|
||||
|
@@ -11,6 +11,7 @@ set(DGAME_DCOMPONENTS_SOURCES "AchievementVendorComponent.cpp"
|
||||
"ControllablePhysicsComponent.cpp"
|
||||
"DestroyableComponent.cpp"
|
||||
"DonationVendorComponent.cpp"
|
||||
"GateRushControlComponent.cpp"
|
||||
"InventoryComponent.cpp"
|
||||
"ItemComponent.cpp"
|
||||
"LevelProgressionComponent.cpp"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
#include "GateRushControlComponent.h"
|
||||
|
||||
GateRushControlComponent::GateRushControlComponent(Entity* parent) : BaseRacingControlComponent(parent) {
|
||||
GateRushControlComponent::GateRushControlComponent(Entity* parent, int32_t componentId) : BaseRacingControlComponent(parent, componentId) {
|
||||
|
||||
}
|
||||
|
@@ -9,7 +9,7 @@ class Entity;
|
||||
class GateRushControlComponent : public BaseRacingControlComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::GATE_RUSH_CONTROL;
|
||||
GateRushControlComponent(Entity* parent);
|
||||
GateRushControlComponent(Entity* parent, int32_t componentId);
|
||||
};
|
||||
|
||||
#endif //!__GATERUSHCONTROLCOMPONENT__H__
|
||||
|
@@ -4,12 +4,12 @@
|
||||
|
||||
|
||||
ItemComponent::ItemComponent(Entity* parent) : Component(parent) {
|
||||
m_Parent = parent;
|
||||
m_ParentEntity = parent;
|
||||
|
||||
m_DirtyItemInfo = false;
|
||||
|
||||
m_UgId = m_Parent->GetVarAs<LWOOBJID>(u"userModelID");
|
||||
if (m_UgId == LWOOBJID_EMPTY) m_UgId = m_Parent->GetObjectID();
|
||||
m_UgId = m_ParentEntity->GetVarAs<LWOOBJID>(u"userModelID");
|
||||
if (m_UgId == LWOOBJID_EMPTY) m_UgId = m_ParentEntity->GetObjectID();
|
||||
|
||||
m_UgModerationStatus = eUgcModerationStatus::NoStatus;
|
||||
|
||||
|
@@ -2,6 +2,6 @@
|
||||
|
||||
#include "Entity.h"
|
||||
|
||||
MinigameControlComponent::MinigameControlComponent(Entity* parent) : Component(parent) {
|
||||
MinigameControlComponent::MinigameControlComponent(Entity* parent) : ActivityComponent(parent) {
|
||||
|
||||
}
|
||||
|
@@ -13,7 +13,7 @@ class Entity;
|
||||
*/
|
||||
class MutableModelBehaviorComponent : public Component {
|
||||
public:
|
||||
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL;
|
||||
static const eReplicaComponentType ComponentType = eReplicaComponentType::MODEL_BEHAVIOR;
|
||||
|
||||
MutableModelBehaviorComponent(Entity* parent);
|
||||
|
||||
|
@@ -25,7 +25,7 @@
|
||||
|
||||
#include "CppScripts.h"
|
||||
|
||||
QuickBuildComponent::QuickBuildComponent(Entity* entity, uint32_t componentId) : Component(entity) {
|
||||
QuickBuildComponent::QuickBuildComponent(Entity* entity, uint32_t componentId) : ActivityComponent(entity) {
|
||||
m_ComponentId = componentId;
|
||||
std::u16string checkPreconditions = entity->GetVar<std::u16string>(u"CheckPrecondition");
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#define M_PI 3.14159265358979323846264338327950288
|
||||
#endif
|
||||
|
||||
RacingControlComponent::RacingControlComponent(Entity* parent) : BaseRacingControlComponent(parent) {
|
||||
RacingControlComponent::RacingControlComponent(Entity* parent, int32_t componentId) : BaseRacingControlComponent(parent, componentId) {
|
||||
m_PathName = u"MainPath";
|
||||
m_RemainingLaps = 3;
|
||||
m_LeadingPlayer = LWOOBJID_EMPTY;
|
||||
|
@@ -107,7 +107,7 @@ class RacingControlComponent : public BaseRacingControlComponent {
|
||||
public:
|
||||
inline static const eReplicaComponentType ComponentType = eReplicaComponentType::RACING_CONTROL;
|
||||
|
||||
RacingControlComponent(Entity* parentEntity);
|
||||
RacingControlComponent(Entity* parentEntity, int32_t componentId);
|
||||
~RacingControlComponent();
|
||||
|
||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||
|
@@ -0,0 +1,5 @@
|
||||
#include "RacingSoundTriggerComponent.h"
|
||||
|
||||
RacingSoundTriggerComponent::RacingSoundTriggerComponent(Entity* parent) : SoundTriggerComponent(parent) {
|
||||
|
||||
}
|
||||
|
@@ -53,12 +53,6 @@ public:
|
||||
m_DirtyVendor = true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the list if items the vendor sells.
|
||||
* @return the list of items.
|
||||
*/
|
||||
std::map<LOT, int>& GetInventory();
|
||||
|
||||
/**
|
||||
* Refresh the inventory of this vendor.
|
||||
*/
|
||||
|
Reference in New Issue
Block a user