finally finished but not eating
Finally apply the patch sent by <Someone> in 11/2003 for slashem-Bugs-799278, updated to match the current code and handle additional cases. The fix is brute force: always ensure nomovemsg is set when nomul is called with a negative value. I also scanned the code for places manually setting multi negative, they all set nomovemsg. It would be nice to have a function that did the right thing, but there are several special cases and I was not feeling creative.
This commit is contained in:
@@ -326,7 +326,8 @@ learn()
|
||||
(void) confused_book(context.spbook.book);
|
||||
context.spbook.book = 0; /* no longer studying */
|
||||
context.spbook.o_id = 0;
|
||||
nomul(context.spbook.delay); /* remaining delay is uninterrupted */
|
||||
nomul(context.spbook.delay); /* remaining delay is uninterrupted */
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
return(0);
|
||||
}
|
||||
@@ -466,7 +467,8 @@ register struct obj *spellbook;
|
||||
if (too_hard) {
|
||||
boolean gone = cursed_book(spellbook);
|
||||
|
||||
nomul(context.spbook.delay); /* study time */
|
||||
nomul(context.spbook.delay); /* study time */
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
if(gone || !rn2(3)) {
|
||||
if (!gone) pline_The("spellbook crumbles to dust!");
|
||||
@@ -482,6 +484,7 @@ register struct obj *spellbook;
|
||||
spellbook->in_use = FALSE;
|
||||
}
|
||||
nomul(context.spbook.delay);
|
||||
nomovemsg = 0;
|
||||
context.spbook.delay = 0;
|
||||
return(1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user