Move game paused check from Module into Game

This commit is contained in:
Vsevolod Kremianskii 2021-05-04 12:30:08 +07:00
parent 93996accf2
commit fb8bf67aaf
2 changed files with 3 additions and 6 deletions

View file

@ -519,13 +519,10 @@ void Game::update() {
updateCamera(dt);
bool updModule = !_video && _module && (_screen == GameScreen::InGame || _screen == GameScreen::Conversation);
if (updModule) {
if (updModule && !_paused) {
_module->update(dt);
if (!_paused) {
_combat.update(dt);
}
}
GUI *gui = getScreenGUI();
if (gui) {

View file

@ -264,7 +264,7 @@ void Module::onPlaceableClick(const shared_ptr<Placeable> &placeable) {
}
void Module::update(float dt) {
if (!_game->isPaused() && _game->cameraType() == CameraType::ThirdPerson) {
if (_game->cameraType() == CameraType::ThirdPerson) {
_player->update(dt);
}
_area->update(dt);