diff options
| -rw-r--r-- | src/message_system.cpp | 8 |
1 files changed, 1 insertions, 7 deletions
| diff --git a/src/message_system.cpp b/src/message_system.cpp index 4a31a69..f9803ed 100644 --- a/src/message_system.cpp +++ b/src/message_system.cpp | |||
| @@ -119,15 +119,9 @@ void MessageSystem::displayMessage(std::string_view msg, std::string speakerName | |||
| 119 | // textbox. | 119 | // textbox. |
| 120 | for (const std::string& word : words) { | 120 | for (const std::string& word : words) { |
| 121 | int wordWidth = 0; | 121 | int wordWidth = 0; |
| 122 | bool firstChar = true; | ||
| 123 | for (int i=0; i<word.size(); i++) { | 122 | for (int i=0; i<word.size(); i++) { |
| 124 | if (firstChar) { | ||
| 125 | firstChar = false; | ||
| 126 | } else { | ||
| 127 | wordWidth++; | ||
| 128 | } | ||
| 129 | |||
| 130 | wordWidth += game_.getFont().getCharacterWidth(word[i]); | 123 | wordWidth += game_.getFont().getCharacterWidth(word[i]); |
| 124 | wordWidth++; | ||
| 131 | } | 125 | } |
| 132 | 126 | ||
| 133 | int nextWidth = curWidth + wordWidth; | 127 | int nextWidth = curWidth + wordWidth; |
