Fix land unit flak when pin-bombed to match flak when overflown
land_bomb() failed to reduce flak proportional to efficiency. Missed
in commit c7f68f2e
, v4.3.6.
Also change it to round randomly instead of down, to match
ac_landflak().
This commit is contained in:
parent
6a95e67e4f
commit
bc805ba81a
1 changed files with 3 additions and 2 deletions
|
@ -752,8 +752,9 @@ land_bomb(struct emp_qelem *list, struct sctstr *target)
|
|||
continue;
|
||||
|
||||
aaf = lnd_aaf(&land);
|
||||
flak = (int)(techfact(land.lnd_tech, aaf) * 3.0);
|
||||
if (flak) {
|
||||
if (aaf) {
|
||||
flak = roundavg(techfact(land.lnd_tech,
|
||||
aaf * 3.0 * land.lnd_effic / 100.0));
|
||||
PR(land.lnd_own,
|
||||
"Flak! Firing flak guns from unit %s (aa rating %d)\n",
|
||||
prland(&land), aaf);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue