Fix #17980: Path mess and desync when hovering track design

This commit is contained in:
Michael Steenbeek 2022-09-23 22:49:16 +02:00 committed by GitHub
parent 53877c244c
commit 7af999e2dd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 14 additions and 5 deletions

View File

@ -62,7 +62,8 @@
- Fix: [#17905] The chain button in the map window is enabled for rectangular maps when (re)opened.
- Fix: [#17931] The in-game command count_objects crashes the game.
- Fix: [#17865] With difficult guest generation, tested but unopened rides still contribute to the guest cap.
- Fix: [#17866] [Plugin] Wrong Soft Guest Cap at start of new game
- Fix: [#17866] [Plugin] Wrong Soft Guest Cap at start of new game.
- Fix: [#17980] Queue lines of track designs mess up existing queue lines if dragged through them.
- Fix: [#17959] Areas marked for dirty drawing are too large.
- Fix: [#17963] Some marketing campaigns cant be started after Finances window tab has been on Research.
- Fix: [#17966] Reversed steel trains do not properly import from S4.

View File

@ -1257,8 +1257,11 @@ static GameActions::Result TrackDesignPlaceSceneryElement(
return GameActions::Result();
}
footpath_queue_chain_reset();
footpath_remove_edges_at(mapCoord, reinterpret_cast<TileElement*>(pathElement));
if (tds.PlaceOperation == PTD_OPERATION_PLACE)
{
footpath_queue_chain_reset();
footpath_remove_edges_at(mapCoord, reinterpret_cast<TileElement*>(pathElement));
}
flags = GAME_COMMAND_FLAG_APPLY;
if (tds.PlaceOperation == PTD_OPERATION_PLACE_TRACK_PREVIEW)
@ -1274,8 +1277,13 @@ static GameActions::Result TrackDesignPlaceSceneryElement(
{
flags |= GAME_COMMAND_FLAG_REPLAY;
}
footpath_connect_edges(mapCoord, reinterpret_cast<TileElement*>(pathElement), flags);
footpath_update_queue_chains();
if (tds.PlaceOperation == PTD_OPERATION_PLACE)
{
footpath_connect_edges(mapCoord, reinterpret_cast<TileElement*>(pathElement), flags);
footpath_update_queue_chains();
}
return GameActions::Result();
}
break;