Веб-сайт самохостера Lotigara

summaryrefslogtreecommitdiff
path: root/source/frontend/StarMainInterface.cpp
diff options
context:
space:
mode:
authorKae <80987908+Novaenia@users.noreply.github.com>2024-03-15 16:26:12 +1100
committerKae <80987908+Novaenia@users.noreply.github.com>2024-03-15 16:26:12 +1100
commit696abcca71274fbda2470f1941cb2e06b6ff8c61 (patch)
treeb3ba52a56383acbd5c3fa504cff3601a081b2b2e /source/frontend/StarMainInterface.cpp
parent658fab846e401b956530739f9ab4dce192362027 (diff)
fix late aimPosition
Diffstat (limited to 'source/frontend/StarMainInterface.cpp')
-rw-r--r--source/frontend/StarMainInterface.cpp8
1 files changed, 6 insertions, 2 deletions
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());