From eadad3513ab349e3f87cb8893fd6f44a6235fdec Mon Sep 17 00:00:00 2001 From: Andrettin <6322423+Andrettin@users.noreply.github.com> Date: Wed, 5 Jan 2022 10:19:05 +0100 Subject: [PATCH] Pause game immediately when calling a dialogue for the person player (if we leave the interface to pause it, that will only occur a few cycles later) --- src/stratagus/dialogue_node.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/stratagus/dialogue_node.cpp b/src/stratagus/dialogue_node.cpp index 765e9bee5..2fb11c882 100644 --- a/src/stratagus/dialogue_node.cpp +++ b/src/stratagus/dialogue_node.cpp @@ -33,6 +33,7 @@ #include "dialogue.h" #include "dialogue_option.h" #include "engine_interface.h" +#include "game/game.h" #include "luacallback.h" #include "player/faction.h" #include "player/player.h" @@ -193,6 +194,10 @@ void dialogue_node::call(CPlayer *player, const context &ctx) const const int channel = PlayGameSound(this->sound, MaxSampleVolume); dialogue::add_sound_channel(channel); } + + if (!game::get()->is_multiplayer()) { + game::get()->set_paused(true); + } } void dialogue_node::option_effect(const int option_index, CPlayer *player, const context &ctx) const