(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:
parent
828b84d840
commit
abd1fd2c1e
4 changed files with 6 additions and 5 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue