mirror of https://github.com/OpenRCT2/OpenRCT2.git
Make constant values more explicit.
Fix mistake in z coordinate conversion
This commit is contained in:
parent
b34defa907
commit
521e5db4c2
|
@ -534,7 +534,7 @@ static void viewport_interaction_remove_footpath(TileElement* tileElement, Coord
|
|||
{
|
||||
if (tileElement2->GetType() == TILE_ELEMENT_TYPE_PATH && tileElement2->base_height == z)
|
||||
{
|
||||
footpath_remove({ mapCoords, z }, GAME_COMMAND_FLAG_APPLY);
|
||||
footpath_remove({ mapCoords, z * 8 }, GAME_COMMAND_FLAG_APPLY);
|
||||
break;
|
||||
}
|
||||
} while (!(tileElement2++)->IsLastForTile());
|
||||
|
|
|
@ -1002,7 +1002,7 @@ static void window_footpath_construct()
|
|||
// already is lowered if we are building a downwards slope.
|
||||
if (gFootpathConstructSlope == 2)
|
||||
{
|
||||
gFootpathConstructFromPosition.z += 2 * 8;
|
||||
gFootpathConstructFromPosition.z += (2 * 8);
|
||||
}
|
||||
}
|
||||
window_footpath_set_enabled_and_pressed_widgets();
|
||||
|
@ -1228,7 +1228,7 @@ static void footpath_get_next_path_info(int32_t* type, CoordsXYZ& footpathLoc, i
|
|||
*slope = gFootpathConstructDirection | TILE_ELEMENT_SLOPE_S_CORNER_UP;
|
||||
if (gFootpathConstructSlope != 2)
|
||||
{
|
||||
footpathLoc.z -= 2 * 8;
|
||||
footpathLoc.z -= (2 * 8);
|
||||
*slope ^= TILE_ELEMENT_SLOPE_E_CORNER_UP;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -190,7 +190,7 @@ money32 footpath_provisional_set(int32_t type, CoordsXYZ footpathLoc, int32_t sl
|
|||
else
|
||||
{
|
||||
// Going up in the world!
|
||||
virtual_floor_set_height(gFootpathProvisionalPosition.z + 2 * 8);
|
||||
virtual_floor_set_height(gFootpathProvisionalPosition.z + (2 * 8));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue