Don't let ships double-retreat first on 'i' and then on 'h'
When a ship is shelled, retreat condition 'i' (injured) applies. When there's no return fire, 'h' (helpless) applies as well. Ships retreated twice in that case. Fix that.
This commit is contained in:
parent
204caeb243
commit
de2651efa1
1 changed files with 4 additions and 3 deletions
|
@ -493,8 +493,9 @@ multifire(void)
|
||||||
putship(vship.shp_uid, &vship);
|
putship(vship.shp_uid, &vship);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if ((totaldefdam == 0) && (target == targ_ship))
|
if (totaldefdam == 0 && target == targ_ship
|
||||||
if (vship.shp_rflags & RET_HELPLESS)
|
&& (vship.shp_rflags & RET_HELPLESS)
|
||||||
|
&& !(vship.shp_rflags & RET_INJURED))
|
||||||
retreat_ship(&vship, 'h');
|
retreat_ship(&vship, 'h');
|
||||||
switch (attgp->ef_type) {
|
switch (attgp->ef_type) {
|
||||||
case EF_SECTOR:
|
case EF_SECTOR:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue