issue #1027 - sticky 'nofollowers' flag
Reported by copperwater: entering the tutorial sets 'u.nofollowers', changing to the tutorial level saves a copy of 'u', post-level change from entering the tutorial level resets u.followers, but subsequently changing levels to return to the original level 1 restores 'u' from the saved copy with has 'u.nofollowers==True', overriding the reset. Move the nofollowers flag from 'u' to 'iflags'. Invalides save and bones files. Fixes #1027
This commit is contained in:
@@ -1592,6 +1592,9 @@ the fuzzer could get stuck in a loop if hero died in a way where life-saving
|
|||||||
fix unicorn horn's ability to repair blindness
|
fix unicorn horn's ability to repair blindness
|
||||||
quest nemesis and a few other special monsters are suppressed from bones;
|
quest nemesis and a few other special monsters are suppressed from bones;
|
||||||
their death feedback could be given when they were removed
|
their death feedback could be given when they were removed
|
||||||
|
running the tutorial until completion and returning to normal play but left
|
||||||
|
the 'no followers' flag set; adjacent pets wouldn't tag along when
|
||||||
|
hero moved to other levels
|
||||||
|
|
||||||
|
|
||||||
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
Fixes to 3.7.0-x Platform and/or Interface Problems Exposed Via git Repository
|
||||||
|
|||||||
@@ -197,6 +197,7 @@ struct instance_flags {
|
|||||||
boolean invis_goldsym; /* gold symbol is ' '? */
|
boolean invis_goldsym; /* gold symbol is ' '? */
|
||||||
boolean in_lua; /* executing a lua script */
|
boolean in_lua; /* executing a lua script */
|
||||||
boolean lua_testing; /* doing lua tests */
|
boolean lua_testing; /* doing lua tests */
|
||||||
|
boolean nofollowers; /* level change ignores pets (for tutorial) */
|
||||||
boolean partly_eaten_hack; /* extra flag for xname() used when it's called
|
boolean partly_eaten_hack; /* extra flag for xname() used when it's called
|
||||||
* indirectly so we can't use xname_flags() */
|
* indirectly so we can't use xname_flags() */
|
||||||
boolean remember_getpos; /* save getpos() positioning in do-again queue */
|
boolean remember_getpos; /* save getpos() positioning in do-again queue */
|
||||||
|
|||||||
@@ -17,7 +17,7 @@
|
|||||||
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
* Incrementing EDITLEVEL can be used to force invalidation of old bones
|
||||||
* and save files.
|
* and save files.
|
||||||
*/
|
*/
|
||||||
#define EDITLEVEL 85
|
#define EDITLEVEL 86
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Development status possibilities.
|
* Development status possibilities.
|
||||||
|
|||||||
@@ -358,7 +358,6 @@ struct you {
|
|||||||
d_level utolev; /* level monster teleported you to, or uz */
|
d_level utolev; /* level monster teleported you to, or uz */
|
||||||
uchar utotype; /* bitmask of goto_level() flags for utolev */
|
uchar utotype; /* bitmask of goto_level() flags for utolev */
|
||||||
d_level ucamefrom; /* level where you came from; used for tutorial */
|
d_level ucamefrom; /* level where you came from; used for tutorial */
|
||||||
boolean nofollowers; /* level change ignores monster followers/pets */
|
|
||||||
boolean umoved; /* changed map location (post-move) */
|
boolean umoved; /* changed map location (post-move) */
|
||||||
int last_str_turn; /* 0: none, 1: half turn, 2: full turn
|
int last_str_turn; /* 0: none, 1: half turn, 2: full turn
|
||||||
* +: turn right, -: turn left */
|
* +: turn right, -: turn left */
|
||||||
|
|||||||
+2
-2
@@ -519,12 +519,12 @@ maybe_do_tutorial(void)
|
|||||||
|
|
||||||
if (ask_do_tutorial()) {
|
if (ask_do_tutorial()) {
|
||||||
assign_level(&u.ucamefrom, &u.uz);
|
assign_level(&u.ucamefrom, &u.uz);
|
||||||
u.nofollowers = TRUE;
|
iflags.nofollowers = TRUE;
|
||||||
schedule_goto(&sp->dlevel, UTOTYPE_NONE, (char *) 0, (char *) 0);
|
schedule_goto(&sp->dlevel, UTOTYPE_NONE, (char *) 0, (char *) 0);
|
||||||
deferred_goto();
|
deferred_goto();
|
||||||
vision_recalc(0);
|
vision_recalc(0);
|
||||||
docrt();
|
docrt();
|
||||||
u.nofollowers = FALSE;
|
iflags.nofollowers = FALSE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1522,7 +1522,7 @@ goto_level(
|
|||||||
set_ustuck((struct monst *) 0); /* clear u.ustuck and u.uswallow */
|
set_ustuck((struct monst *) 0); /* clear u.ustuck and u.uswallow */
|
||||||
set_uinwater(0); /* u.uinwater = 0 */
|
set_uinwater(0); /* u.uinwater = 0 */
|
||||||
u.uundetected = 0; /* not hidden, even if means are available */
|
u.uundetected = 0; /* not hidden, even if means are available */
|
||||||
if (!u.nofollowers)
|
if (!iflags.nofollowers)
|
||||||
keepdogs(FALSE);
|
keepdogs(FALSE);
|
||||||
recalc_mapseen(); /* recalculate map overview before we leave the level */
|
recalc_mapseen(); /* recalculate map overview before we leave the level */
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user