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:
@@ -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 */
|
||||
|
||||
/****************************************/
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user