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.
putship(vship.shp_uid, &vship);
break;
}
- if ((totaldefdam == 0) && (target == targ_ship))
- if (vship.shp_rflags & RET_HELPLESS)
- retreat_ship(&vship, 'h');
+ if (totaldefdam == 0 && target == targ_ship
+ && (vship.shp_rflags & RET_HELPLESS)
+ && !(vship.shp_rflags & RET_INJURED))
+ retreat_ship(&vship, 'h');
switch (attgp->ef_type) {
case EF_SECTOR:
putsect(&fsect);