Fix current_display_speed overflow (#232)
This commit is contained in:
parent
ec1c95bdb3
commit
07e1127096
@ -2914,6 +2914,12 @@ void Courtroom::chat_tick()
|
|||||||
next_character_is_not_special = false;
|
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 &&
|
if ((message_display_speed[current_display_speed] <= 0 &&
|
||||||
tick_pos < f_message.size() - 1) ||
|
tick_pos < f_message.size() - 1) ||
|
||||||
formatting_char) {
|
formatting_char) {
|
||||||
@ -2942,12 +2948,6 @@ void Courtroom::chat_tick()
|
|||||||
|
|
||||||
ui_vp_message->ensureCursorVisible();
|
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
|
// Blip player and real tick pos ticker
|
||||||
if (!formatting_char && (f_character != ' ' || blank_blip)) {
|
if (!formatting_char && (f_character != ' ' || blank_blip)) {
|
||||||
if (blip_ticker % blip_rate == 0) {
|
if (blip_ticker % blip_rate == 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user