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
1 changed files with 4 additions and 2 deletions

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;
}
}
}