From 278d9aa7eb084bd6f93e6ac1fd84033dc316ab5e Mon Sep 17 00:00:00 2001 From: Thorbjørn Lindeijer Date: Thu, 15 Feb 2024 14:15:27 +0100 Subject: Fix handling of non-consecutive emote IDs Previous code was assuming there would be no gaps in the emote IDs. Also cleaned up some confusion where the "emote ID" being passed around in the code was often offset by 1. Now it is only offset in communication with tmwAthena and when saving the shortcuts. --- src/game.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/game.cpp') diff --git a/src/game.cpp b/src/game.cpp index 49f33db0..90721224 100644 --- a/src/game.cpp +++ b/src/game.cpp @@ -436,7 +436,7 @@ void Game::handleInput() { // Emotions int emotion = keyboard.getKeyEmoteOffset(event.key.keysym.sym); - if (emotion) + if (emotion != -1) { emoteShortcut->useEmote(emotion); used = true; -- cgit v1.2.3-70-g09d2