fire: Fix ship retreat when helpless
Two bugs. First, multifire() checks the condition only for surface ships, not for submarines. Second, multifire() neglects to write back the ship after retreating it. The player is told the ship retreats, but it actually stays where it is. Broken since retreat was added in Chainsaw. Previous fixes (commit8065fe8
, v4.3.1 and commitde2651e
, v4.3.19) "fixed" only the bulletin. Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
This commit is contained in:
parent
30ce78d6df
commit
6d2244093a
3 changed files with 24 additions and 26 deletions
|
@ -446,13 +446,13 @@ multifire(void)
|
|||
&& (vship.shp_rflags & RET_DCHRGED)
|
||||
&& !(vship.shp_rflags & RET_INJURED))
|
||||
retreat_ship(&vship, 'd');
|
||||
else if (totaldefdam == 0
|
||||
&& (vship.shp_rflags & RET_HELPLESS)
|
||||
&& !(vship.shp_rflags & RET_INJURED))
|
||||
retreat_ship(&vship, 'h');
|
||||
putship(vship.shp_uid, &vship);
|
||||
break;
|
||||
}
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue