boe.actions.cpp: try to make key work even when the talk ends

This commit is contained in:
ALONSO Laurent
2022-07-16 13:52:51 +02:00
committed by Celtic Minstrel
parent 81c8f9bba5
commit 4fd9f42c8e

View File

@@ -1639,9 +1639,8 @@ bool handle_keystroke(const sf::Event& event){
chr2 = Key::G;
for(short i = 0; i < 9; i++)
if(chr2 == talk_chars[i] && (!talk_end_forced || i == 6 || i == 5)) {
int j = talk_end_forced ? i - 5 : i;
// related to talk_area_rect, unsure why adding +9 is needed?
pass_point = talk_words[j].rect.topLeft();
pass_point = talk_words[i].rect.topLeft();
pass_point.x += talk_area_rect.left+9;
pass_point.y += talk_area_rect.top+9;
pass_point = mainPtr.mapCoordsToPixel(pass_point, mainView);