Make missile animations slower

They were running at max frame rate, making them too fast to see on most modern machines.

Except the 5ms increment, this patch is from @x-qq
This commit is contained in:
2020-02-04 00:20:55 -05:00
parent 72bd8265fa
commit 37e10ed3ad

View File

@@ -435,9 +435,7 @@ void do_missile_anim(short num_steps,location missile_origin,short sound_num) {
} }
} }
mainPtr.display(); mainPtr.display();
int speed = get_int_pref("GameSpeed"); sf::sleep(sf::milliseconds(2 + 5 * get_int_pref("GameSpeed")));
if(speed == 3 || (speed == 1 && t % 4 == 0) || (speed == 2 && t % 3 == 0))
sf::sleep(time_in_ticks(1));
} }
// Exit gracefully, and clean up screen // Exit gracefully, and clean up screen