Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCUMM: fix bug 4591 Zak keeps walk animation without moving #2991

Closed
wants to merge 1 commit into from

Conversation

@lkramer
Copy link
Contributor

@lkramer lkramer commented Apr 30, 2021

This fixes a bug described here: https://bugs.scummvm.org/ticket/4594

It seems that if the script tells the player actor to turn towards
something while the player actor is walking, the walk animation is not
stopped.

The fix is to play the standing animation after turning
direction.

The bug is easy to reproduce following the steps in the bug report, and is also reproducible in the PC version (Zak McKracken and the Alien Mindbenders (V2/DOS/English)). I played through a good deal of scripted events in Zak and could see no adverse behaviour. To be on the safe side, we could put a guard around the code change so it's only executed if the game is Zak.

This fixes a bug described here: https://bugs.scummvm.org/ticket/4594

It seems that if the script tells the player actor to turn towards
something while the player actor is walking, the walk animation is not
stopped.

The fix is simply to play the standing animation after turning
direction.
@athrxx
Copy link
Member

@athrxx athrxx commented May 1, 2021

Thank you for working on this.
However, I currently don't see that the original code would do something like this there.
So, where does this call to startAnimActor(_standFrame) come from?

The original code seems to do exactly 2 things:

  1. set _targetFacing to the new direction
  2. set _actor_moving to MF_TURN

But that might just be me not seeing it...
The fact that our code is based on SCUMM5 and support for the other SCUMM versions has been factored into that doesn't make figuring out things like this any easier (even this newDirToOldDir/fromSimpleDir/toSimpleDir/normalizeAngle stuff drives me nuts every time).

@lkramer
Copy link
Contributor Author

@lkramer lkramer commented May 1, 2021

Hi, you're right. I did not do my research well enough. I'll withdraw the PR. Thanks for looking.

@lkramer lkramer closed this May 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants