Remove unused hash functions and start the road building from the map center
This commit is contained in:

committed by
Jonathan G Rennison

parent
4542410b41
commit
8d584990aa
@@ -1241,17 +1241,6 @@ static void River_FoundEndNode(AyStar *aystar, OpenListNode *current)
|
||||
|
||||
static const uint RIVER_HASH_SIZE = 8; ///< The number of bits the hash for river finding should have.
|
||||
|
||||
/**
|
||||
* Simple hash function for river tiles to be used by AyStar.
|
||||
* @param tile The tile to hash.
|
||||
* @param dir The unused direction.
|
||||
* @return The hash for the tile.
|
||||
*/
|
||||
static uint River_Hash(uint tile, uint dir)
|
||||
{
|
||||
return GB(TileHash(TileX(tile), TileY(tile)), 0, RIVER_HASH_SIZE);
|
||||
}
|
||||
|
||||
/**
|
||||
* Actually build the river between the begin and end tiles using AyStar.
|
||||
* @param begin The begin of the river.
|
||||
@@ -1267,7 +1256,7 @@ static void BuildRiver(TileIndex begin, TileIndex end)
|
||||
finder.FoundEndNode = River_FoundEndNode;
|
||||
finder.user_target = &end;
|
||||
|
||||
finder.Init(River_Hash, 1 << RIVER_HASH_SIZE);
|
||||
finder.Init(1 << RIVER_HASH_SIZE);
|
||||
|
||||
AyStarNode start;
|
||||
start.tile = begin;
|
||||
|
Reference in New Issue
Block a user