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