diff --git a/dGame/dComponents/BouncerComponent.cpp b/dGame/dComponents/BouncerComponent.cpp index c58fba088..f08bd71c4 100644 --- a/dGame/dComponents/BouncerComponent.cpp +++ b/dGame/dComponents/BouncerComponent.cpp @@ -16,6 +16,11 @@ BouncerComponent::BouncerComponent(Entity* parent, const int32_t componentID) : m_PetEnabled = false; m_PetBouncerEnabled = false; m_PetSwitchLoaded = false; + RegisterMsg(&BouncerComponent::MsgGetObjectReportInfo); +} + +// The level config: destination, speed, arc and targets (and the pet switch of LOT 7625) +void BouncerComponent::LoadConfigData() { m_Destination = GeneralUtils::TryParse( GeneralUtils::SplitString(m_Parent->GetVarAsString(u"bouncer_destination"), '\x1f')) .value_or(NiPoint3Constant::ZERO); @@ -29,11 +34,9 @@ BouncerComponent::BouncerComponent(Entity* parent, const int32_t componentID) : m_MinNumTargets = GeneralUtils::TryParse(m_Parent->GetVarAsString(u"num_targets_to_activate")).value_or(1); m_CinematicPath = m_Parent->GetVarAsString(u"attached_cinematic_path"); - if (parent->GetLOT() == 7625) { + if (m_Parent->GetLOT() == 7625) { LookupPetSwitch(); } - - RegisterMsg(&BouncerComponent::MsgGetObjectReportInfo); } BouncerComponent::~BouncerComponent() { diff --git a/dGame/dComponents/BouncerComponent.h b/dGame/dComponents/BouncerComponent.h index f0493ee92..4ad4c3746 100644 --- a/dGame/dComponents/BouncerComponent.h +++ b/dGame/dComponents/BouncerComponent.h @@ -15,6 +15,8 @@ public: static constexpr eReplicaComponentType ComponentType = eReplicaComponentType::BOUNCER; BouncerComponent(Entity* parentEntity, const int32_t componentID); + + void LoadConfigData() override; ~BouncerComponent() override; void Serialize(RakNet::BitStream& outBitStream, bool bIsInitialUpdate) override;