allow a parent function to restrict use of placebc

placebc was triggering an impossible sometimes on the plane of
water

It turned out to be because movebubbles issued an
unplacebc(), but a downstream function called
placebc(), so when movebubbles() issued its own
placebc() there was a problem.

The downstream function that beat movebubbles to the placebc()
turned out to be unstuck(). There could be others.
This commit is contained in:
nhmall
2019-06-04 21:18:46 -04:00
parent 05a0d10097
commit a65682f58e
5 changed files with 185 additions and 42 deletions

View File

@@ -1400,7 +1400,7 @@ movebubbles()
struct bubble *b;
struct container *cons;
struct trap *btrap;
int x, y, i, j;
int x, y, i, j, bcpin;
/* set up the portal the first time bubbles are moved */
if (!wportal)
@@ -1411,7 +1411,7 @@ movebubbles()
if (Is_waterlevel(&u.uz)) {
/* keep attached ball&chain separate from bubble objects */
if (Punished)
unplacebc();
bcpin = unplacebc_and_covet_placebc();
/*
* Pick up everything inside of a bubble then fill all bubble
@@ -1528,7 +1528,7 @@ movebubbles()
/* put attached ball&chain back */
if (Is_waterlevel(&u.uz) && Punished)
placebc();
lift_covet_and_placebc(bcpin);
vision_full_recalc = 1;
}