Create footpath_get_edges()

This commit is contained in:
Michael Steenbeek committed 2018-02-06 10:41:31 +01:00
1 parent 688577375f
commit b78a744b8e
3 files changed
+9 -2

No files matched your search

+2 -2
View File
@@ -9856,7 +9856,7 @@ static uint8 peep_pathfind_get_max_number_junctions(rct_peep * peep)
*/
static bool path_is_thin_junction(rct_tile_element * path, sint16 x, sint16 y, uint8 z)
{
uint8 edges = path->properties.path.edges & 0xF;
uint8 edges = footpath_get_edges(path);
sint32 test_edge = bitscanforward(edges);
if (test_edge == -1)
@@ -10119,7 +10119,7 @@ static void peep_pathfind_heuristic_search(sint16 x, sint16 y, uint8 z, rct_peep
searchResult = PATH_SEARCH_THIN;
uint8 numEdges = bitcount(tileElement->properties.path.edges & 0x0F);
uint8 numEdges = bitcount(footpath_get_edges(tileElement));
if (numEdges < 2)
{
+5
View File
@@ -2273,3 +2273,8 @@ rct_footpath_entry *get_footpath_entry(sint32 entryIndex)
{
return gFootpathEntries[entryIndex];
}
uint8 footpath_get_edges(const rct_tile_element * element)
{
return element->properties.path.edges & 0xF;
}
+2
View File
@@ -171,4 +171,6 @@ rct_footpath_entry * get_footpath_entry(sint32 entryIndex);
void footpath_queue_chain_reset();
void footpath_queue_chain_push(uint8 rideIndex);
uint8 footpath_get_edges(const rct_tile_element * element);
#endif