Don't unlimber when guns unsuccessfully try to fire
This happened when fire command failed becayse the gun lacked shells,
and when other ways to fire failed because the gun was inefficient,
embarked, lacked mil, guns or shells.
Broken in commit b8bdc32b
, hvy-metal-2.4.
This commit is contained in:
parent
2b90a5230d
commit
c40dd61bf0
4 changed files with 1 additions and 4 deletions
|
@ -349,7 +349,6 @@ multifire(void)
|
||||||
range2 = -1;
|
range2 = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
lnd_unlimber(&fland);
|
|
||||||
dam = lnd_fire(&fland);
|
dam = lnd_fire(&fland);
|
||||||
putland(fland.lnd_uid, &fland);
|
putland(fland.lnd_uid, &fland);
|
||||||
if (dam < 0) {
|
if (dam < 0) {
|
||||||
|
@ -713,7 +712,6 @@ quiet_bigdef(int type, struct emp_qelem *list, natid own, natid aown,
|
||||||
if (fp)
|
if (fp)
|
||||||
dam2 = fp->defdam;
|
dam2 = fp->defdam;
|
||||||
else {
|
else {
|
||||||
lnd_unlimber(&land);
|
|
||||||
dam2 = lnd_fire(&land);
|
dam2 = lnd_fire(&land);
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
}
|
}
|
||||||
|
|
|
@ -207,6 +207,7 @@ lnd_fire(struct lndstr *lp)
|
||||||
I_SHELL, ammo - shells);
|
I_SHELL, ammo - shells);
|
||||||
if (shells == 0)
|
if (shells == 0)
|
||||||
return -1;
|
return -1;
|
||||||
|
lnd_unlimber(lp);
|
||||||
d = landunitgun(lp->lnd_effic, guns);
|
d = landunitgun(lp->lnd_effic, guns);
|
||||||
if (shells < ammo) {
|
if (shells < ammo) {
|
||||||
d *= (double)shells / (double)ammo;
|
d *= (double)shells / (double)ammo;
|
||||||
|
|
|
@ -1142,7 +1142,6 @@ lnd_support(natid victim, natid attacker, coord x, coord y, int defending)
|
||||||
if (dist > range)
|
if (dist > range)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
lnd_unlimber(&land);
|
|
||||||
dam2 = lnd_fire(&land);
|
dam2 = lnd_fire(&land);
|
||||||
putland(land.lnd_uid, &land);
|
putland(land.lnd_uid, &land);
|
||||||
if (dam2 < 0)
|
if (dam2 < 0)
|
||||||
|
|
|
@ -445,7 +445,6 @@ perform_mission(coord x, coord y, natid victim, struct emp_qelem *list,
|
||||||
if (md > range)
|
if (md > range)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
lnd_unlimber(lp);
|
|
||||||
dam2 = lnd_fire(lp);
|
dam2 = lnd_fire(lp);
|
||||||
putland(lp->lnd_uid, lp);
|
putland(lp->lnd_uid, lp);
|
||||||
if (dam2 < 0)
|
if (dam2 < 0)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue