-
Notifications
You must be signed in to change notification settings - Fork 454
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix #H2636 - vault guard "fakecorr overflow" panic
Another 6.5 year old report. This one from Steven Melenchuk told how to reproduce C343-23 which is still open on our 'known bugs' page. (I've no idea whether the original bug report came through the contact page, and if so, what its assigned number was.) I didn't try to solve this one, I just confirmed that it could be reproduced and took the fix from grunthack at github. He didn't menion a fix at the time but implemented one before abandoing his variant. (Others kept it going afterwards; fix was during his time.) The overflow occurred when the guard couldn't figure out where to move to next and just repeatedly 'moved' to his current location until the maximum number of fake corridor spots was used up. The fix detects not knowing where to go next and explicitly choosing a new destination. Original problem could be reproduced by teleporting into the vault, digging out a wall and two spaces of stone in a straight line, then going back into the vault to wait for a guard. When he shows up: answer, drop gold, follow. If the guard's path walks through both dug spaces, he will stop waiting for the hero. But hero is in between the guard and the gap in the vault wall and can't advance; guard has reached a persistent corridor so doesn't know where to go next. Have hero wait for 125-ish more turns and then game panicks. The code was 3.4.3 vintage so needed thorough reformatting, but not any actual changes (unless I've overlooked something).
- Loading branch information
PatR
committed
Dec 19, 2018
1 parent
81d73ce
commit b32c93c
Showing
2 changed files
with
73 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters