From 90ac91e0df4a92a72c5d4bff6af6b64510733ae6 Mon Sep 17 00:00:00 2001 From: David Markowitz Date: Wed, 6 Mar 2024 03:23:37 -0800 Subject: [PATCH] Use consistent calling try to always have the first parameter match how you got the script for readability --- dGame/dComponents/MovingPlatformComponent.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dGame/dComponents/MovingPlatformComponent.cpp b/dGame/dComponents/MovingPlatformComponent.cpp index 27ade7d8..77acbb8d 100644 --- a/dGame/dComponents/MovingPlatformComponent.cpp +++ b/dGame/dComponents/MovingPlatformComponent.cpp @@ -183,7 +183,7 @@ void MovingPlatformComponent::StartPathing() { const auto travelNext = subComponent->mWaitTime + travelTime; m_Parent->AddCallbackTimer(travelTime, [subComponent, this] { - GetParent()->GetScript()->OnWaypointReached(m_Parent, subComponent->mNextWaypointIndex); + this->m_Parent->GetScript()->OnWaypointReached(m_Parent, subComponent->mNextWaypointIndex); }); m_Parent->AddCallbackTimer(travelNext, [this] { @@ -293,7 +293,7 @@ void MovingPlatformComponent::ContinuePathing() { const auto travelNext = subComponent->mWaitTime + travelTime; m_Parent->AddCallbackTimer(travelTime, [subComponent, this] { - this->GetParent()->GetScript()->OnWaypointReached(m_Parent, subComponent->mNextWaypointIndex); + this->m_Parent->GetScript()->OnWaypointReached(m_Parent, subComponent->mNextWaypointIndex); }); m_Parent->AddCallbackTimer(travelNext, [this] {