From 43d73f7b915c0a328ee9ebc03513e4818e74d943 Mon Sep 17 00:00:00 2001 From: MangosArentLiterature <58055358+MangosArentLiterature@users.noreply.github.com> Date: Thu, 8 Apr 2021 14:02:59 -0500 Subject: [PATCH] Fix current char being removed from the char_taken list too early --- src/aoclient.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/aoclient.cpp b/src/aoclient.cpp index c06da28..6dbf76d 100644 --- a/src/aoclient.cpp +++ b/src/aoclient.cpp @@ -138,10 +138,6 @@ void AOClient::changeCharacter(int char_id) { AreaData* area = server->areas[current_area]; - if (current_char != "") { - area->characters_taken.removeAll(server->getCharID(current_char)); - } - if(char_id >= server->characters.length()) return; @@ -151,6 +147,10 @@ void AOClient::changeCharacter(int char_id) if (taken || char_selected == "") return; + if (current_char != "") { + area->characters_taken.removeAll(server->getCharID(current_char)); + } + area->characters_taken.append(char_id); current_char = char_selected; }