MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / preUpdate

Method preUpdate

source/frontend/StarMainInterface.cpp:530–541  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528}
529
530void MainInterface::preUpdate(float) {
531 auto player = m_client->mainPlayer();
532 if (!m_client->paused())
533 player->aim(cursorWorldPosition());
534
535 if (m_paneManager.topPane({PaneLayer::Window, PaneLayer::ModalWindow}))
536 player->setBusyState(PlayerBusyState::Menu);
537 else if (m_chat->hasFocus())
538 player->setBusyState(PlayerBusyState::Chatting);
539 else
540 player->setBusyState(PlayerBusyState::None);
541}
542
543void MainInterface::update(float dt) {
544 m_paneManager.update(dt);

Callers 1

updateRunningMethod · 0.80

Calls 6

mainPlayerMethod · 0.80
pausedMethod · 0.80
aimMethod · 0.80
topPaneMethod · 0.80
setBusyStateMethod · 0.80
hasFocusMethod · 0.45

Tested by

no test coverage detected