Skip to content

Commit

Permalink
Fix OpenTTD#7334: Ship lost after crossing bridge due to path cache n…
Browse files Browse the repository at this point in the history
…ot being consumed while on final bridge end.
  • Loading branch information
PeterN authored and douiwby committed Apr 16, 2020
1 parent 6723948 commit 63beeea
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/ship_cmd.cpp
Expand Up @@ -759,6 +759,10 @@ static void ShipController(Ship *v)
if ((v->vehstatus & VS_HIDDEN) == 0) v->Vehicle::UpdateViewport(true);
return;
}

/* Ship is back on the bridge head, we need to comsume its path
* cache entry here as we didn't have to choose a ship track. */
if (!v->path.empty()) v->path.pop_front();
}

/* update image of ship, as well as delta XY */
Expand Down

0 comments on commit 63beeea

Please sign in to comment.