@@ -11,12 +11,13 @@
#include "pathfind.h"
#include "station.h"
#include "station_map.h"
#include "tile.h"
#include "depot.h"
#include "tunnel_map.h"
#include "network.h"
static AyStar _npf_aystar;
/* The cost of each trackdir. A diagonal piece is the full NPF_TILE_LENGTH,
* the shorter piece is sqrt(2)/2*NPF_TILE_LENGTH =~ 0.7071
*/
@@ -202,19 +203,22 @@ static uint NPFSlopeCost(AyStarNode* cur
return 0;
/* Should we give a bonus for slope down? Probably not, we
* could just substract that bonus from the penalty, because
* there is only one level of steepness... */
}
/* Mark tiles by mowing the grass when npf debug level >= 1 */
/**
* Mark tiles by mowing the grass when npf debug level >= 1.
* Will not work for multiplayer games, since it can (will) cause desyncs.
static void NPFMarkTile(TileIndex tile)
{
#ifdef NO_DEBUG_MESSAGES
return;
#else
if (_debug_npf_level < 1) return;
if (_debug_npf_level < 1 || _networking) return;
switch (GetTileType(tile)) {
case MP_RAILWAY:
/* DEBUG: mark visited tiles by mowing the grass under them ;-) */
if (!IsTileDepotType(tile, TRANSPORT_RAIL)) {
SetRailGroundType(tile, RAIL_GROUND_BARREN);
MarkTileDirtyByTile(tile);
Status change: