From 97035124522bed16c716c72deab5e3995b1eebb7 Mon Sep 17 00:00:00 2001 From: Celtic Minstrel Date: Tue, 1 Sep 2015 15:01:25 -0400 Subject: [PATCH] Fix key equivalents broken when the toolbar was redesigned --- src/boe.actions.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/boe.actions.cpp b/src/boe.actions.cpp index 49cd632d..26dc8dec 100644 --- a/src/boe.actions.cpp +++ b/src/boe.actions.cpp @@ -2053,7 +2053,7 @@ bool handle_keystroke(sf::Event& event){ break; case 'a': if(overall_mode < MODE_TALK_TOWN) { - pass_point.x = (overall_mode == MODE_OUTDOORS) ? 170 : 221; + pass_point.x = (overall_mode == MODE_OUTDOORS) ? 180 : 221; pass_point.y = 405; pass_event.mouseButton.x = pass_point.x + ul.x; pass_event.mouseButton.y = pass_point.y + ul.y; @@ -2084,7 +2084,7 @@ bool handle_keystroke(sf::Event& event){ if((overall_mode == MODE_COMBAT) || ((overall_mode == MODE_FIRING) && (chr == 's')) || ((overall_mode == MODE_THROWING) && (chr == 's')) ) { - pass_point.x = (chr == 's') ? 205 : 240; + pass_point.x = (chr == 's') ? 215 : 250; pass_point.y = (chr == 'e') ? 390 : 406; pass_event.mouseButton.x = pass_point.x + ul.x; pass_event.mouseButton.y = pass_point.y + ul.y; @@ -2100,6 +2100,7 @@ bool handle_keystroke(sf::Event& event){ if(chr == 'm') j = 0; else if(chr == 'p') j = 1; } + // TODO: There's several weird things about this conditional. Why 'f' when the key to initiate this is 's'? Why is it checking for 't' (though that can never be true)? if(chr == 'f' && (overall_mode == MODE_FIRING || overall_mode == MODE_THROWING || chr == 't')) // cancel missile j = 6; if((overall_mode == MODE_OUTDOORS) || (overall_mode == MODE_TOWN) || (overall_mode == MODE_COMBAT)) { @@ -2155,7 +2156,7 @@ bool handle_keystroke(sf::Event& event){ break; case 'f': if(overall_mode != MODE_TOWN) return false; - j = 6; + j = 7; break; } }