mirror of
https://github.com/OpenRCT2/OpenRCT2
synced 2025-12-24 00:03:11 +01:00
Fix stack corruption when footpath dragging
This commit is contained in:
committed by
GitHub
parent
d95a7c4fc7
commit
9e03ec4caa
@@ -1300,15 +1300,12 @@ namespace OpenRCT2::Ui::Windows
|
|||||||
{
|
{
|
||||||
auto footpathPlaceAction = GameActions::FootpathPlaceAction(
|
auto footpathPlaceAction = GameActions::FootpathPlaceAction(
|
||||||
tile.position, tile.slope, selectedType, gFootpathSelection.Railings, kInvalidDirection, constructFlags);
|
tile.position, tile.slope, selectedType, gFootpathSelection.Railings, kInvalidDirection, constructFlags);
|
||||||
footpathPlaceAction.SetCallback(
|
auto result = GameActions::Execute(&footpathPlaceAction, getGameState());
|
||||||
[&anySuccess, &cost](const GameActions::GameAction* ga, const GameActions::Result* result) {
|
if (result.Error == GameActions::Status::Ok)
|
||||||
if (result->Error == GameActions::Status::Ok)
|
{
|
||||||
{
|
anySuccess = true;
|
||||||
anySuccess = true;
|
cost += result.Cost;
|
||||||
cost += result->Cost;
|
}
|
||||||
}
|
|
||||||
});
|
|
||||||
GameActions::Execute(&footpathPlaceAction, getGameState());
|
|
||||||
lastLocation = tile.position;
|
lastLocation = tile.position;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user