Prevent infinite loop

...if the map is filled with monsters, and for some reason
the drowning just won't kill you.

Infinite looping cannot currently happen, because no-one who
can drown can keep surviving the drowning once their amulet
of life saving is used up.
This commit is contained in:
Pasi Kallinen
2015-04-15 20:06:38 +03:00
parent 35e0027328
commit 97f6834730

View File

@@ -3470,7 +3470,7 @@ drown()
}
u.uinwater = 1;
You("drown.");
for (;;) {
for (i = 0; i < 5; i++) { /* arbitrary number of loops */
/* killer format and name are reconstructed every iteration
because lifesaving resets them */
pool_of_water = waterbody_name(u.ux, u.uy);