Skip to content

Commit

Permalink
Pause game immediately when calling a dialogue for the person player …
Browse files Browse the repository at this point in the history
…(if we leave the interface to pause it, that will only occur a few cycles later)
  • Loading branch information
Andrettin committed Jan 5, 2022
1 parent e2191df commit eadad35
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/stratagus/dialogue_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit eadad35

Please sign in to comment.