mirror of
https://github.com/doukutsu-rs/doukutsu-rs
synced 2025-11-22 13:03:38 +00:00
prevent zero division if 0 as wait is passed to <FON/<FOM
This commit is contained in:
parent
19dad43d7a
commit
39171cc9a9
|
|
@ -95,6 +95,10 @@ impl Frame {
|
||||||
screen_width += 10.0;
|
screen_width += 10.0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if self.wait == 0 { // prevent zero division
|
||||||
|
self.wait = 1;
|
||||||
|
}
|
||||||
|
|
||||||
let tile_size = state.tile_size.as_int();
|
let tile_size = state.tile_size.as_int();
|
||||||
|
|
||||||
if (stage.map.width as usize).saturating_sub(1) * (tile_size as usize) < screen_width as usize {
|
if (stage.map.width as usize).saturating_sub(1) * (tile_size as usize) < screen_width as usize {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue