From 696abcca71274fbda2470f1941cb2e06b6ff8c61 Mon Sep 17 00:00:00 2001 From: Kae <80987908+Novaenia@users.noreply.github.com> Date: Fri, 15 Mar 2024 16:26:12 +1100 Subject: fix late aimPosition --- source/frontend/StarMainInterface.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source/frontend/StarMainInterface.cpp') diff --git a/source/frontend/StarMainInterface.cpp b/source/frontend/StarMainInterface.cpp index d98d888..0d0cb5f 100644 --- a/source/frontend/StarMainInterface.cpp +++ b/source/frontend/StarMainInterface.cpp @@ -505,6 +505,12 @@ void MainInterface::handleInteractAction(InteractAction interactAction) { } } +void MainInterface::preUpdate(float dt) { + auto player = m_client->mainPlayer(); + if (!m_client->paused()) + player->aim(cursorWorldPosition()); +} + void MainInterface::update(float dt) { m_paneManager.update(dt); m_cursor.update(dt); @@ -516,8 +522,6 @@ void MainInterface::update(float dt) { auto player = m_client->mainPlayer(); auto cursorWorldPos = cursorWorldPosition(); - if (!m_client->paused()) - player->aim(cursorWorldPos); if (player->wireToolInUse()) { m_paneManager.displayRegisteredPane(MainInterfacePanes::WireInterface); player->setWireConnector(m_wireInterface.get()); -- cgit v1.2.3