Auto Draw Sword

Discuss PoP1 for DOS here.
Post Reply
User avatar
Akruzen
Developer
Developer
Posts: 141
Joined: April 30th, 2016, 10:16 am

Auto Draw Sword

Post by Akruzen »

A "bug" in Prince of Persia where the kid decides whether or not to draw sword automatically depending on if you press shift somewhere else or not.
P.S. This is independent of which level you are in. If you manually sheathe your sword and don't leave the screen, the prince will not draw the sword automatically, unless you press shift key.



Any idea why this is happening? This is the case with both the DOS and the SDLPoP version.
What if life is a video game and Déjà Vu are just checkpoints?
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Auto Draw Sword

Post by dmitry_s »

When you sheathe the sword manually, the "offguard" variable is set.

https://github.com/NagyD/SDLPoP/blob/cd ... 005.c#L990

And there is logic that does not draw the sword when the "offset" variable is set and "Shift" has not been pressed.

https://github.com/NagyD/SDLPoP/blob/cd ... 005.c#L355

The offguard variable should probably be set to 0 when the "can_guard_see_kid" variable is set to 0.
dmitry_s
Developer
Developer
Posts: 148
Joined: July 27th, 2021, 7:22 am

Re: Auto Draw Sword

Post by dmitry_s »

Yeah, that fixed the problem in SDLPoP.

Post Reply