From 94b65859cc44c2f0d9e539ab1031aa67806962c3 Mon Sep 17 00:00:00 2001 From: ALONSO Laurent Date: Mon, 4 Oct 2021 09:20:32 +0200 Subject: [PATCH] fix: we can not use arrows in MODE_TOWN_TARGET --- src/game/boe.actions.cpp | 2 +- src/game/boe.newgraph.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/game/boe.actions.cpp b/src/game/boe.actions.cpp index 91ae5d51..7c3d58a6 100644 --- a/src/game/boe.actions.cpp +++ b/src/game/boe.actions.cpp @@ -1684,7 +1684,7 @@ bool handle_keystroke(const sf::Event& event){ if(i == 0) { chr2 = kb::Z; } - else if (overall_mode == MODE_FIRING || overall_mode == MODE_THROWING || overall_mode == MODE_SPELL_TARGET || overall_mode == MODE_TOWN_TARGET || overall_mode == MODE_FANCY_TARGET) { + else if (overall_mode == MODE_FIRING || overall_mode == MODE_THROWING || overall_mode == MODE_SPELL_TARGET || overall_mode == MODE_FANCY_TARGET) { bool need_redraw=true; if (i>=1 && i<=3 && center.y < univ.town->in_town_rect.bottom && center.y < univ.town->max_dim - 5) center.y++; diff --git a/src/game/boe.newgraph.cpp b/src/game/boe.newgraph.cpp index 0850a44d..17b6f4f1 100644 --- a/src/game/boe.newgraph.cpp +++ b/src/game/boe.newgraph.cpp @@ -978,6 +978,7 @@ void place_talk_str(std::string str_to_place,std::string str_to_place2,short col std::vector word_rects = draw_string_hilite(talk_gworld, word_place_rect, str, style, hilites, color ? Colours::DARK_BLUE : Colours::DARK_RED); if(!talk_end_forced) { + talk_words.resize(9); // clean the talk_words (if this code is called many times) // Now build the list of word rects for(size_t i = 0; i < hilites.size(); i++) { word_rect_t thisRect;