1
0
mirror of https://github.com/OpenRCT2/OpenRCT2 synced 2026-01-06 06:32:56 +01:00

Fix bug in track remove.

Fixes #1552
This commit is contained in:
Duncan Frost
2015-07-05 20:57:14 +01:00
parent f42ac4715a
commit da0368d1a3

View File

@@ -3999,8 +3999,8 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
const rct_preview_track* trackBlock = get_track_def_from_ride(ride, type);
trackBlock += mapElement->properties.track.sequence & 0xF;
switch (mapElement->type & MAP_ELEMENT_DIRECTION_MASK){
uint8 originDirection = mapElement->type & MAP_ELEMENT_DIRECTION_MASK;
switch (originDirection){
case 0:
originX -= trackBlock->x;
originY -= trackBlock->y;
@@ -4027,7 +4027,7 @@ money32 track_remove(uint8 type, uint8 sequence, sint16 originX, sint16 originY,
for (; trackBlock->index != 255; trackBlock++){
sint16 x = originX, y = originY, z = originZ;
switch (mapElement->type & MAP_ELEMENT_DIRECTION_MASK){
switch (originDirection){
case 0:
x += trackBlock->x;
y += trackBlock->y;