From 11caad6a6e07581c94a28e6711d4672501068d38 Mon Sep 17 00:00:00 2001 From: Degranon Date: Sat, 1 Feb 2025 01:45:34 +0100 Subject: Use Player:MoveTo instead of mcontroller->setPosition --- source/game/StarUniverseClient.cpp | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) (limited to 'source/game/StarUniverseClient.cpp') diff --git a/source/game/StarUniverseClient.cpp b/source/game/StarUniverseClient.cpp index 279d63d..af33508 100644 --- a/source/game/StarUniverseClient.cpp +++ b/source/game/StarUniverseClient.cpp @@ -417,14 +417,12 @@ void UniverseClient::warpPlayer(WarpAction const& warpAction, bool animate, Stri m_mainPlayer->stopLounging(); - // Check if the warp target is within the same world - if (warpAction.is()) { - if (auto warpToWorld = warpAction.ptr()) { - if (warpToWorld->world.empty() || warpToWorld->world == playerWorld()) { - if (auto pos = warpToWorld->target.ptr()) { - m_mainPlayer->movementController()->setPosition(*pos + Vec2F{0, 2}); // Add a little space to up - return; - } + // Check if the warp target is within the same world + if (auto warpToWorld = warpAction.ptr()) { + if (warpToWorld->world.empty() || warpToWorld->world == playerWorld()) { + if (auto pos = warpToWorld->target.ptr()) { + m_mainPlayer->moveTo(*pos); // Add a little space to up + return; } } } -- cgit v1.2.3