fix: Stop player and camera movement when opening party selection
This commit is contained in:
parent
40651d368f
commit
ad209bcb7a
2 changed files with 8 additions and 1 deletions
|
@ -540,12 +540,17 @@ void Game::openInGameMenu(InGameMenu::Tab tab) {
|
|||
}
|
||||
|
||||
void Game::startDialog(SpatialObject &owner, const string &resRef) {
|
||||
_module->player().stopMovement();
|
||||
stopMovement();
|
||||
setCursorType(CursorType::Default);
|
||||
_screen = GameScreen::Dialog;
|
||||
_dialog->startDialog(owner, resRef);
|
||||
}
|
||||
|
||||
void Game::stopMovement() {
|
||||
getActiveCamera()->stopMovement();
|
||||
_module->player().stopMovement();
|
||||
}
|
||||
|
||||
void Game::openContainer(SpatialObject *container) {
|
||||
setCursorType(CursorType::Default);
|
||||
_container->open(container);
|
||||
|
@ -553,6 +558,7 @@ void Game::openContainer(SpatialObject *container) {
|
|||
}
|
||||
|
||||
void Game::openPartySelection(const PartySelection::Context &ctx) {
|
||||
stopMovement();
|
||||
setCursorType(CursorType::Default);
|
||||
_partySelect->prepare(ctx);
|
||||
_screen = GameScreen::PartySelection;
|
||||
|
|
|
@ -227,6 +227,7 @@ private:
|
|||
void runMainLoop();
|
||||
void toggleInGameCameraType();
|
||||
void updateCamera(float dt);
|
||||
void stopMovement();
|
||||
|
||||
std::string getMainMenuMusic() const;
|
||||
std::string getCharacterGenerationMusic() const;
|
||||
|
|
Loading…
Reference in a new issue