Skip to content

Commit

Permalink
Don't start an already active dialogue event.
Browse files Browse the repository at this point in the history
This will fix the Warning seen when dealing quickly with dialogues that have events triggered when beginning a line.

The BeginLine() function could be called more than once because of emotes of the use of the confirm key, but the begin event could also be triggered more than once when a short dialogue could be triggered several times.

Closes #82.
  • Loading branch information
Yohann Ferreira committed Dec 18, 2012
1 parent 97b8e71 commit f505563
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modes/map/map_dialogue.cpp
Expand Up @@ -486,7 +486,7 @@ void DialogueSupervisor::_BeginLine()
// Starts possible events at new line.
MapMode *map_mode = MapMode::CurrentInstance();
std::string line_event = _current_dialogue->GetLineBeginEvent(_line_counter);
if(!line_event.empty()) {
if(!line_event.empty() && !map_mode->GetEventSupervisor()->IsEventActive(line_event)) {
map_mode->GetEventSupervisor()->StartEvent(line_event);
}

Expand Down

0 comments on commit f505563

Please sign in to comment.