1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-23 06:44:38 +01:00

Refactor out references to compatibility function wall_remove

This commit is contained in:
ZehMatt
2018-04-22 19:11:06 +02:00
committed by Aaron van Geffen
parent 8cb76cd969
commit 5e4cdeb78b
6 changed files with 39 additions and 39 deletions

View File

@@ -45,6 +45,7 @@
#include "../world/SmallScenery.h"
#include "../world/Surface.h"
#include "../world/Wall.h"
#include "../actions/WallRemoveAction.hpp"
struct map_backup
{
@@ -859,8 +860,16 @@ track_design_place_scenery(rct_td6_scenery_element * scenery_start, sint32 origi
0);
break;
case OBJECT_TYPE_WALLS:
z = (scenery->z * 8 + originZ) / 8;
wall_remove(mapCoord.x, mapCoord.y, z, (rotation + scenery->flags) & TILE_ELEMENT_DIRECTION_MASK, flags);
{
z = (scenery->z * 8 + originZ) / 8;
uint8_t direction = (rotation + scenery->flags) & TILE_ELEMENT_DIRECTION_MASK;
auto wallRemoveAction = WallRemoveAction(mapCoord.x, mapCoord.y, z, direction);
wallRemoveAction.SetFlags(flags);
GameActions::Execute(&wallRemoveAction);
}
break;
case OBJECT_TYPE_PATHS:
z = (scenery->z * 8 + originZ) / 8;