pull request #953 - map updating when underwater

Pull request from entrez:  moving while underwater didn't always
update the map properly if hero got more than one move during a turn.

Closes #953
This commit is contained in:
PatR
2023-01-21 11:13:35 -08:00
2 changed files with 8 additions and 7 deletions

View File

@@ -331,16 +331,11 @@ moveloop_core(void)
/* XXX This should be recoded to use something like regions - a list of
* things that are active and need to be handled that is dynamically
* maintained and not a list of special cases. */
/* underwater and waterlevel vision are done here */
/* vision will be updated as bubbles move */
if (Is_waterlevel(&u.uz) || Is_airlevel(&u.uz))
movebubbles();
else if (Is_firelevel(&u.uz))
fumaroles();
else if (Underwater)
under_water(0);
/* vision while buried done here */
else if (u.uburied)
under_ground(0);
/* when immobile, count is in turns */
if (gm.multi < 0) {
@@ -393,6 +388,12 @@ moveloop_core(void)
else if (!u.umoved)
(void) pooleffects(FALSE);
/* vision while buried or underwater is updated here */
if (Underwater)
under_water(0);
else if (u.uburied)
under_ground(0);
} /* actual time passed */
/****************************************/

View File

@@ -1598,7 +1598,7 @@ use_lamp(struct obj *obj)
return;
}
if (Underwater) {
pline(!Is_candle(obj) ? "This is not a diving lamp"
pline(!Is_candle(obj) ? "This is not a diving lamp."
: "Sorry, fire and water don't mix.");
return;
}