From f505563039822edc7635efad45ce200fe34af77f Mon Sep 17 00:00:00 2001 From: Yohann Ferreira Date: Tue, 18 Dec 2012 18:12:42 +0100 Subject: [PATCH] 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. --- src/modes/map/map_dialogue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/modes/map/map_dialogue.cpp b/src/modes/map/map_dialogue.cpp index 97350c903..4ea6ded9c 100644 --- a/src/modes/map/map_dialogue.cpp +++ b/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); }