1
0
Fork 0
mirror of https://github.com/doukutsu-rs/doukutsu-rs synced 2025-01-15 15:26:50 +00:00

fix P2 skin OOB error

This commit is contained in:
József Sallai 2023-01-26 16:56:13 +02:00
parent 2774eae66f
commit 153b1b4962

View file

@ -153,10 +153,12 @@ impl PlayerCountMenu {
if state.player2_skin_location.offset * 2 * 16 >= tex_size.1 {
state.player2_skin_location.offset = 0;
if state.player2_skin_location.texture_index == 1 {
if (state.player2_skin_location.texture_index as usize)
== state.constants.player_skin_paths.len() - 1
{
state.player2_skin_location.texture_index = 0;
} else {
state.player2_skin_location.texture_index = 1;
state.player2_skin_location.texture_index += 1;
}
}
}