Permalink
Browse files

Don't start an already active dialogue event.

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...
1 parent 97b8e71 commit f505563039822edc7635efad45ce200fe34af77f @Bertram25 Bertram25 committed Dec 18, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/modes/map/map_dialogue.cpp
@@ -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);
}

0 comments on commit f505563

Please sign in to comment.