diff options
| author | windrammer <31085911+likeawindrammer@users.noreply.github.com> | 2020-08-04 09:03:40 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-04 10:03:40 -0500 |
| commit | 07e1127096d4e47f39facc43ecbf94007c8e08b8 (patch) | |
| tree | 04fbd100f9df2bbc195eb336620a90fd11f35a3f | |
| parent | ec1c95bdb33dd063880c4cb6c3c9c3cf5d0ed454 (diff) | |
Fix current_display_speed overflow (#232)
| -rw-r--r-- | src/courtroom.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/courtroom.cpp b/src/courtroom.cpp index 98b6a9c3..d727b81a 100644 --- a/src/courtroom.cpp +++ b/src/courtroom.cpp @@ -2914,6 +2914,12 @@ void Courtroom::chat_tick() next_character_is_not_special = false; } + // Keep the speed at bay. + if (current_display_speed < 0) + current_display_speed = 0; + else if (current_display_speed > 6) + current_display_speed = 6; + if ((message_display_speed[current_display_speed] <= 0 && tick_pos < f_message.size() - 1) || formatting_char) { @@ -2942,12 +2948,6 @@ void Courtroom::chat_tick() ui_vp_message->ensureCursorVisible(); - // Keep the speed at bay. - if (current_display_speed < 0) - current_display_speed = 0; - else if (current_display_speed > 6) - current_display_speed = 6; - // Blip player and real tick pos ticker if (!formatting_char && (f_character != ' ' || blank_blip)) { if (blip_ticker % blip_rate == 0) { |
