From 399bb02abf9fb960952ac1d90d0f636ac78a3e34 Mon Sep 17 00:00:00 2001 From: collett Date: Tue, 6 Jul 2021 06:49:37 +0900 Subject: [PATCH] fix mount action interrupt --- src/world/Action/Action.cpp | 1 - src/world/Action/MountAction.cpp | 2 ++ src/world/Actor/Chara.cpp | 2 +- src/world/Actor/Player.cpp | 2 +- 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/world/Action/Action.cpp b/src/world/Action/Action.cpp index 31e72d1d..a7a0d4d7 100644 --- a/src/world/Action/Action.cpp +++ b/src/world/Action/Action.cpp @@ -266,7 +266,6 @@ bool Action::Action::update() if( isInterrupted() ) { - interrupt(); return true; } diff --git a/src/world/Action/MountAction.cpp b/src/world/Action/MountAction.cpp index 39b928d3..60b0cdfe 100644 --- a/src/world/Action/MountAction.cpp +++ b/src/world/Action/MountAction.cpp @@ -57,6 +57,8 @@ void MountAction::start() auto actionStartPkt = makeActorControlSelf( m_pSource->getId(), ActorControlType::ActionStart, 1, getId(), m_recastTimeMs / 10 ); player->queuePacket( actionStartPkt ); + + m_started = true; } void MountAction::execute() diff --git a/src/world/Actor/Chara.cpp b/src/world/Actor/Chara.cpp index 0fb0f9e1..769809de 100644 --- a/src/world/Actor/Chara.cpp +++ b/src/world/Actor/Chara.cpp @@ -473,7 +473,7 @@ Sapphire::World::Action::ActionPtr Sapphire::Entity::Chara::getCurrentAction() c /*! \param ActionPtr of the action to be registered */ void Sapphire::Entity::Chara::setCurrentAction( Sapphire::World::Action::ActionPtr pAction ) { - m_pCurrentAction = std::move( pAction ); + m_pCurrentAction = pAction; } uint32_t Sapphire::Entity::Chara::getBonusStat( Common::BaseParam bonus ) const diff --git a/src/world/Actor/Player.cpp b/src/world/Actor/Player.cpp index 7eaea9c7..12cfb824 100644 --- a/src/world/Actor/Player.cpp +++ b/src/world/Actor/Player.cpp @@ -2269,7 +2269,7 @@ bool Sapphire::Entity::Player::hasQueuedAction() const void Sapphire::Entity::Player::setQueuedAction( Sapphire::World::Action::ActionPtr pAction ) { - m_pQueuedAction = std::move( pAction ); // overwrite previous queued action if any + m_pQueuedAction = pAction; } bool Sapphire::Entity::Player::checkAction()