(FALLOUT_MAX): New.

(doland, detonate, spread_fallout): Use it.  With variables, fallout
beyond the capacity of variables (65535) was ignored, except in
doland(), where it saturated at 9999, and spread_fallout, where it
could overflow.  Now it always saturates at FALLOUT_MAX.
This commit is contained in:
Markus Armbruster 2004-03-04 16:19:50 +00:00
parent 828b84d840
commit abd1fd2c1e
4 changed files with 6 additions and 5 deletions

View file

@ -112,7 +112,7 @@ detonate(struct plnstr *pp, int x, int y)
fallout += damage * 30;
else
fallout += damage * 3;
sect.sct_fallout = fallout;
sect.sct_fallout = min(fallout, FALLOUT_MAX);
}
if (damage > 100) {
makelost(EF_SECTOR, sect.sct_own, 0, sect.sct_x, sect.sct_y);