mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2025-06-11 04:35:39 +00:00
quick notes
This commit is contained in:
parent
43657324e9
commit
4336cb7f50
@ -123,6 +123,8 @@ void SimpleMoverPlatformSubComponent::LoadDataFromTemplate() {
|
|||||||
|
|
||||||
NiPoint3 platformMove = platformEntry->platformMove;
|
NiPoint3 platformMove = platformEntry->platformMove;
|
||||||
float moveTime = platformEntry->moveTime;
|
float moveTime = platformEntry->moveTime;
|
||||||
|
m_PlatformMove = platformMove;
|
||||||
|
m_MoveTime = moveTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleMoverPlatformSubComponent::SimpleMoverPlatformSubComponent(MovingPlatformComponent* parentComponent, const NiPoint3& platformMove, const bool startsInReverse) : PlatformSubComponent(parentComponent) {
|
SimpleMoverPlatformSubComponent::SimpleMoverPlatformSubComponent(MovingPlatformComponent* parentComponent, const NiPoint3& platformMove, const bool startsInReverse) : PlatformSubComponent(parentComponent) {
|
||||||
@ -143,6 +145,10 @@ MovingPlatformComponent::MovingPlatformComponent(Entity* parent, const std::stri
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MovingPlatformComponent::LoadDataFromTemplate() {
|
||||||
|
std::for_each(m_Platforms.begin(), m_Platforms.end(), [](const std::unique_ptr<PlatformSubComponent>& platform) { platform->LoadDataFromTemplate(); });
|
||||||
|
}
|
||||||
|
|
||||||
void MovingPlatformComponent::LoadConfigData() {
|
void MovingPlatformComponent::LoadConfigData() {
|
||||||
if (m_Parent->GetVar<bool>(u"platformIsSimpleMover")) {
|
if (m_Parent->GetVar<bool>(u"platformIsSimpleMover")) {
|
||||||
AddMovingPlatform<SimpleMoverPlatformSubComponent>(NiPoint3::ZERO, false);
|
AddMovingPlatform<SimpleMoverPlatformSubComponent>(NiPoint3::ZERO, false);
|
||||||
@ -212,6 +218,7 @@ void MovingPlatformComponent::GotoWaypoint(uint32_t index, bool stopAtWaypoint)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MovingPlatformComponent::StartPathing() {
|
void MovingPlatformComponent::StartPathing() {
|
||||||
|
// state == Travelling
|
||||||
// //GameMessages::SendStartPathing(m_Parent);
|
// //GameMessages::SendStartPathing(m_Parent);
|
||||||
// m_PathingStopped = false;
|
// m_PathingStopped = false;
|
||||||
|
|
||||||
@ -263,6 +270,7 @@ void MovingPlatformComponent::StartPathing() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MovingPlatformComponent::ContinuePathing() {
|
void MovingPlatformComponent::ContinuePathing() {
|
||||||
|
// state == Travelling
|
||||||
// auto* subComponent = static_cast<MoverSubComponent*>(m_MoverSubComponent);
|
// auto* subComponent = static_cast<MoverSubComponent*>(m_MoverSubComponent);
|
||||||
|
|
||||||
// subComponent->mState = eMovementPlatformState::Stationary;
|
// subComponent->mState = eMovementPlatformState::Stationary;
|
||||||
@ -373,6 +381,7 @@ void MovingPlatformComponent::ContinuePathing() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void MovingPlatformComponent::StopPathing() {
|
void MovingPlatformComponent::StopPathing() {
|
||||||
|
// state == Stopped
|
||||||
//m_Parent->CancelCallbackTimers();
|
//m_Parent->CancelCallbackTimers();
|
||||||
|
|
||||||
// auto* subComponent = static_cast<MoverSubComponent*>(m_MoverSubComponent);
|
// auto* subComponent = static_cast<MoverSubComponent*>(m_MoverSubComponent);
|
||||||
@ -388,10 +397,6 @@ void MovingPlatformComponent::StopPathing() {
|
|||||||
//GameMessages::SendPlatformResync(m_Parent, UNASSIGNED_SYSTEM_ADDRESS);
|
//GameMessages::SendPlatformResync(m_Parent, UNASSIGNED_SYSTEM_ADDRESS);
|
||||||
}
|
}
|
||||||
|
|
||||||
void MovingPlatformComponent::SetSerialized(bool value) {
|
|
||||||
// m_Serialize = value;
|
|
||||||
}
|
|
||||||
|
|
||||||
bool MovingPlatformComponent::GetNoAutoStart() const {
|
bool MovingPlatformComponent::GetNoAutoStart() const {
|
||||||
return false;
|
return false;
|
||||||
// return m_NoAutoStart;
|
// return m_NoAutoStart;
|
||||||
|
@ -37,6 +37,8 @@ public:
|
|||||||
virtual void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate);
|
virtual void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate);
|
||||||
virtual eMoverSubComponentType GetPlatformType() { return eMoverSubComponentType::None; };
|
virtual eMoverSubComponentType GetPlatformType() { return eMoverSubComponentType::None; };
|
||||||
bool GetIsDirty() const { return m_IsDirty; }
|
bool GetIsDirty() const { return m_IsDirty; }
|
||||||
|
virtual void LoadDataFromTemplate() {};
|
||||||
|
virtual void LoadConfigData() {};
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
#ifdef _MOVING_PLATFORM_TEST
|
#ifdef _MOVING_PLATFORM_TEST
|
||||||
@ -85,8 +87,8 @@ public:
|
|||||||
SimpleMoverPlatformSubComponent(MovingPlatformComponent* parentComponent, const NiPoint3& platformMove, const bool startAtEnd);
|
SimpleMoverPlatformSubComponent(MovingPlatformComponent* parentComponent, const NiPoint3& platformMove, const bool startAtEnd);
|
||||||
~SimpleMoverPlatformSubComponent() override = default;
|
~SimpleMoverPlatformSubComponent() override = default;
|
||||||
eMoverSubComponentType GetPlatformType() override { return eMoverSubComponentType::SimpleMover; }
|
eMoverSubComponentType GetPlatformType() override { return eMoverSubComponentType::SimpleMover; }
|
||||||
void LoadConfigData();
|
void LoadConfigData() override;
|
||||||
void LoadDataFromTemplate();
|
void LoadDataFromTemplate() override;
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate) override;
|
||||||
bool m_HasStartingPoint = false;
|
bool m_HasStartingPoint = false;
|
||||||
bool m_DirtyStartingPoint = false;
|
bool m_DirtyStartingPoint = false;
|
||||||
@ -110,6 +112,7 @@ public:
|
|||||||
|
|
||||||
MovingPlatformComponent(Entity* parent, const std::string& pathName);
|
MovingPlatformComponent(Entity* parent, const std::string& pathName);
|
||||||
|
|
||||||
|
void LoadDataFromTemplate();
|
||||||
void LoadConfigData();
|
void LoadConfigData();
|
||||||
|
|
||||||
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
void Serialize(RakNet::BitStream* outBitStream, bool bIsInitialUpdate, unsigned int& flags);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user