(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

@ -616,7 +616,7 @@ doland(s_char op, int arg, s_char *p, struct sctstr *sect)
break;
case 'F':
old = sect->sct_fallout;
new = errcheck(arg, 0, 9999);
new = errcheck(arg, 0, FALLOUT_MAX);
pr("Fallout for sector %s changed from %d to %d\n",
xyas(sect->sct_x, sect->sct_y, player->cnum), old, new);
sect->sct_fallout = new;