mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-14 21:59:17 +00:00
AGS: Fix potentially invalid frame during Character turning
From upstream 84faeccb049883f6d55c0ba34c6a9f02f6bbdbe8
This commit is contained in:
parent
19e7035ded
commit
02a6600080
@ -149,6 +149,8 @@ int CharacterInfo::update_character_walking(CharacterExtras *chex) {
|
||||
} else break;
|
||||
}
|
||||
loop = turnlooporder[wantloop];
|
||||
if (frame >= _GP(views)[view].loops[loop].numFrames)
|
||||
frame = 0; // AVD: make sure the loop always has a valid frame
|
||||
walking -= TURNING_AROUND;
|
||||
// if still turning, wait for next frame
|
||||
if (walking % TURNING_BACKWARDS >= TURNING_AROUND)
|
||||
|
Loading…
Reference in New Issue
Block a user