Fix mention_map and hiders causing a light source error
Prevent glyph change messages while loading a level file. Otherwise a monster hiding under an item triggered a vision recalc before light sources were linked to their sources, leading into strange errors looking like pointer corruption. getlev -> hide_monst -> hideunder -> newsym -> show_glyph -> pline_xy -> vision_recalc -> do_light_sources -> get_obj_location Add in_getlev program state variable, analogous to in_mklev
This commit is contained in:
@@ -1005,6 +1005,8 @@ getlev(NHFILE *nhfp, int pid, xint8 lev)
|
||||
short tlev;
|
||||
#endif
|
||||
|
||||
gp.program_state.in_getlev = TRUE;
|
||||
|
||||
if (ghostly)
|
||||
clear_id_mapping();
|
||||
|
||||
@@ -1233,6 +1235,7 @@ getlev(NHFILE *nhfp, int pid, xint8 lev)
|
||||
|
||||
if (ghostly)
|
||||
clear_id_mapping();
|
||||
gp.program_state.in_getlev = FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
||||
Reference in New Issue
Block a user