1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-24 07:14:31 +01:00

Remove snakes from the foopaths

This commit is contained in:
duncanspumpkin
2022-10-04 07:51:27 +01:00
parent 2c29190ff8
commit 3e8dc1b2ac
42 changed files with 266 additions and 268 deletions

View File

@@ -82,23 +82,23 @@ GameActions::Result FootpathRemoveAction::Execute() const
if (!(GetFlags() & GAME_COMMAND_FLAG_GHOST))
{
footpath_interrupt_peeps(_loc);
footpath_remove_litter(_loc);
FootpathInterruptPeeps(_loc);
FootpathRemoveLitter(_loc);
}
TileElement* footpathElement = GetFootpathElement();
if (footpathElement != nullptr)
{
footpath_queue_chain_reset();
FootpathQueueChainReset();
auto bannerRes = RemoveBannersAtElement(_loc, footpathElement);
if (bannerRes.Error == GameActions::Status::Ok)
{
res.Cost += bannerRes.Cost;
}
footpath_remove_edges_at(_loc, footpathElement);
FootpathRemoveEdgesAt(_loc, footpathElement);
map_invalidate_tile_full(_loc);
tile_element_remove(footpathElement);
footpath_update_queue_chains();
FootpathUpdateQueueChains();
// Remove the spawn point (if there is one in the current tile)
gPeepSpawns.erase(
@@ -125,7 +125,7 @@ TileElement* FootpathRemoveAction::GetFootpathElement() const
{
bool getGhostPath = GetFlags() & GAME_COMMAND_FLAG_GHOST;
TileElement* tileElement = map_get_footpath_element(_loc);
TileElement* tileElement = MapGetFootpathElement(_loc);
TileElement* footpathElement = nullptr;
if (tileElement != nullptr)
{