Changeset - r23476:0c9f98112112
[Not reviewed]
projects/openttd_vs140.vcxproj
Show inline comments
 
@@ -1291,8 +1291,6 @@
 
    <ClCompile Include="..\src\network\core\udp.cpp" />
 
    <ClInclude Include="..\src\network\core\udp.h" />
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp" />
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
 
    <ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
projects/openttd_vs140.vcxproj.filters
Show inline comments
 
@@ -2961,12 +2961,6 @@
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClCompile>
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
projects/openttd_vs141.vcxproj
Show inline comments
 
@@ -1291,8 +1291,6 @@
 
    <ClCompile Include="..\src\network\core\udp.cpp" />
 
    <ClInclude Include="..\src\network\core\udp.h" />
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp" />
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
 
    <ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
projects/openttd_vs141.vcxproj.filters
Show inline comments
 
@@ -2961,12 +2961,6 @@
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClCompile>
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
projects/openttd_vs142.vcxproj
Show inline comments
 
@@ -1291,8 +1291,6 @@
 
    <ClCompile Include="..\src\network\core\udp.cpp" />
 
    <ClInclude Include="..\src\network\core\udp.h" />
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp" />
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp" />
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h" />
 
    <ClInclude Include="..\src\pathfinder\pathfinder_type.h" />
 
    <ClInclude Include="..\src\pathfinder\pf_performance_timer.hpp" />
projects/openttd_vs142.vcxproj.filters
Show inline comments
 
@@ -2961,12 +2961,6 @@
 
    <ClInclude Include="..\src\pathfinder\follow_track.hpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClCompile Include="..\src\pathfinder\opf\opf_ship.cpp">
 
      <Filter>Pathfinder</Filter>
 
    </ClCompile>
 
    <ClInclude Include="..\src\pathfinder\opf\opf_ship.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
 
    <ClInclude Include="..\src\pathfinder\pathfinder_func.h">
 
      <Filter>Pathfinder</Filter>
 
    </ClInclude>
source.list
Show inline comments
 
@@ -1049,8 +1049,6 @@ network/core/udp.h
 

	
 
# Pathfinder
 
pathfinder/follow_track.hpp
 
pathfinder/opf/opf_ship.cpp
 
pathfinder/opf/opf_ship.h
 
pathfinder/pathfinder_func.h
 
pathfinder/pathfinder_type.h
 
pathfinder/pf_performance_timer.hpp
src/openttd.cpp
Show inline comments
 
@@ -434,7 +434,6 @@ struct AfterNewGRFScan : NewGRFScanCallb
 

	
 
		Game::Uninitialize(true);
 
		AI::Uninitialize(true);
 
		CheckConfig();
 
		LoadFromHighScore();
 
		LoadHotkeysFromConfig();
 
		WindowDesc::LoadFromConfig();
src/pathfinder/opf/opf_ship.cpp
Show inline comments
 
deleted file
src/pathfinder/opf/opf_ship.h
Show inline comments
 
deleted file
src/saveload/afterload.cpp
Show inline comments
 
@@ -1875,7 +1875,7 @@ bool AfterLoadGame()
 
		if (_settings_game.pf.yapf.ship_use_yapf) {
 
			_settings_game.pf.pathfinder_for_ships = VPF_YAPF;
 
		} else {
 
			_settings_game.pf.pathfinder_for_ships = (_settings_game.pf.new_pathfinding_all ? VPF_NPF : VPF_OPF);
 
			_settings_game.pf.pathfinder_for_ships = VPF_NPF;
 
		}
 
	}
 

	
src/saveload/saveload.h
Show inline comments
 
@@ -296,6 +296,7 @@ enum SaveLoadVersion : uint16 {
 

	
 
	SLV_SERVE_NEUTRAL_INDUSTRIES,           ///< 210  PR#7234 Company stations can serve industries with attached neutral stations.
 
	SLV_ROADVEH_PATH_CACHE,                 ///< 211  PR#7261 Add path cache for road vehicles.
 
	SLV_REMOVE_OPF,                         ///< 212  PR#7245 Remove OPF.
 

	
 
	SL_MAX_VERSION,                         ///< Highest possible saveload version
 
};
src/settings.cpp
Show inline comments
 
@@ -2275,18 +2275,6 @@ static void Save_PATS()
 
	SaveSettings(_settings, &_settings_game);
 
}
 

	
 
void CheckConfig()
 
{
 
	/*
 
	 * Increase old default values for pf_maxdepth and pf_maxlength
 
	 * to support big networks.
 
	 */
 
	if (_settings_newgame.pf.opf.pf_maxdepth == 16 && _settings_newgame.pf.opf.pf_maxlength == 512) {
 
		_settings_newgame.pf.opf.pf_maxdepth = 48;
 
		_settings_newgame.pf.opf.pf_maxlength = 4096;
 
	}
 
}
 

	
 
extern const ChunkHandler _setting_chunk_handlers[] = {
 
	{ 'OPTS', NULL,      Load_OPTS, NULL, NULL,       CH_RIFF},
 
	{ 'PATS', Save_PATS, Load_PATS, NULL, Check_PATS, CH_RIFF | CH_LAST},
src/settings_func.h
Show inline comments
 
@@ -24,7 +24,6 @@ void IConsoleListSettings(const char *pr
 

	
 
void LoadFromConfig(bool minimal = false);
 
void SaveToConfig();
 
void CheckConfig();
 

	
 
void IniLoadWindowSettings(IniFile *ini, const char *grpname, void *desc);
 
void IniSaveWindowSettings(IniFile *ini, const char *grpname, void *desc);
src/settings_type.h
Show inline comments
 
@@ -346,12 +346,6 @@ struct ScriptSettings {
 
	uint32 script_max_opcode_till_suspend;   ///< max opcode calls till scripts will suspend
 
};
 

	
 
/** Settings related to the old pathfinder. */
 
struct OPFSettings {
 
	uint16 pf_maxlength;                     ///< maximum length when searching for a train route for new pathfinder
 
	byte   pf_maxdepth;                      ///< maximum recursion depth when searching for a train route for new pathfinder
 
};
 

	
 
/** Settings related to the new pathfinder. */
 
struct NPFSettings {
 
	/**
 
@@ -440,7 +434,6 @@ struct PathfinderSettings {
 
	byte   wait_for_pbs_path;                ///< how long to wait for a path reservation.
 
	byte   path_backoff_interval;            ///< ticks between checks for a free path.
 

	
 
	OPFSettings  opf;                        ///< pathfinder settings for the old pathfinder
 
	NPFSettings  npf;                        ///< pathfinder settings for the new pathfinder
 
	YAPFSettings yapf;                       ///< pathfinder settings for the yet another pathfinder
 
};
src/ship_cmd.cpp
Show inline comments
 
@@ -29,7 +29,6 @@
 
#include "sound_func.h"
 
#include "ai/ai.hpp"
 
#include "game/game.hpp"
 
#include "pathfinder/opf/opf_ship.h"
 
#include "engine_base.h"
 
#include "company_base.h"
 
#include "tunnelbridge_map.h"
 
@@ -178,7 +177,6 @@ static void CheckIfShipNeedsService(Vehi
 

	
 
	uint max_distance;
 
	switch (_settings_game.pf.pathfinder_for_ships) {
 
		case VPF_OPF:  max_distance = 12; break;
 
		case VPF_NPF:  max_distance = _settings_game.pf.npf.maximum_go_to_depot_penalty  / NPF_TILE_LENGTH;  break;
 
		case VPF_YAPF: max_distance = _settings_game.pf.yapf.maximum_go_to_depot_penalty / YAPF_TILE_LENGTH; break;
 
		default: NOT_REACHED();
 
@@ -369,9 +367,7 @@ static bool CheckShipLeaveDepot(Ship *v)
 
	if (north_tracks && south_tracks) {
 
		/* Ask pathfinder for best direction */
 
		bool reverse = false;
 
		bool path_found;
 
		switch (_settings_game.pf.pathfinder_for_ships) {
 
			case VPF_OPF: reverse = OPFShipChooseTrack(v, north_neighbour, north_dir, north_tracks, path_found) == INVALID_TRACK; break; // OPF always allows reversing
 
			case VPF_NPF: reverse = NPFShipCheckReverse(v); break;
 
			case VPF_YAPF: reverse = YapfShipCheckReverse(v); break;
 
			default: NOT_REACHED();
 
@@ -492,7 +488,6 @@ static Track ChooseShipTrack(Ship *v, Ti
 
		}
 

	
 
		switch (_settings_game.pf.pathfinder_for_ships) {
 
			case VPF_OPF: track = OPFShipChooseTrack(v, tile, enterdir, tracks, path_found); break;
 
			case VPF_NPF: track = NPFShipChooseTrack(v, path_found); break;
 
			case VPF_YAPF: track = YapfShipChooseTrack(v, tile, enterdir, tracks, path_found, v->path); break;
 
			default: NOT_REACHED();
 
@@ -514,8 +509,7 @@ static inline TrackBits GetAvailShipTrac
 
{
 
	TrackBits tracks = GetTileShipTrackStatus(tile) & DiagdirReachesTracks(dir);
 

	
 
	/* Do not remove 90 degree turns for OPF, as it isn't able to find paths taking it into account. */
 
	if (_settings_game.pf.forbid_90_deg && _settings_game.pf.pathfinder_for_ships != VPF_OPF) tracks &= ~TrackCrossesTracks(TrackdirToTrack(trackdir));
 
	if (_settings_game.pf.forbid_90_deg) tracks &= ~TrackCrossesTracks(TrackdirToTrack(trackdir));
 

	
 
	return tracks;
 
}
src/table/settings.ini
Show inline comments
 
@@ -953,12 +953,12 @@ type     = SLE_UINT8
 
from     = SLV_87
 
guiflags = SGF_MULTISTRING
 
def      = 2
 
min      = 0
 
min      = 1
 
max      = 2
 
interval = 1
 
str      = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS
 
strhelp  = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT
 
strval   = STR_CONFIG_SETTING_PATHFINDER_OPF
 
strval   = STR_CONFIG_SETTING_PATHFINDER_NPF
 
proc     = InvalidateShipPathCache
 
cat      = SC_EXPERT
 

	
 
@@ -1670,23 +1670,10 @@ max      = 255
 
cat      = SC_EXPERT
 

	
 
##
 
[SDT_VAR]
 
base     = GameSettings
 
var      = pf.opf.pf_maxlength
 
type     = SLE_UINT16
 
def      = 4096
 
min      = 64
 
max      = 65535
 
cat      = SC_EXPERT
 

	
 
[SDT_VAR]
 
base     = GameSettings
 
var      = pf.opf.pf_maxdepth
 
type     = SLE_UINT8
 
def      = 48
 
min      = 4
 
max      = 255
 
cat      = SC_EXPERT
 
; Used to be pf.opf.pf_maxlength & pf.opf.pf_maxdepth
 
[SDT_NULL]
 
length   = 3
 
to       = SLV_REMOVE_OPF
 

	
 
##
 
[SDT_VAR]
src/vehicle_type.h
Show inline comments
 
@@ -60,7 +60,7 @@ static const VehicleID INVALID_VEHICLE =
 

	
 
/** Pathfinding option states */
 
enum VehiclePathFinders {
 
	VPF_OPF  = 0, ///< The Original PathFinder (only for ships)
 
	// Original PathFinder (OPF) used to be 0
 
	VPF_NPF  = 1, ///< New PathFinder
 
	VPF_YAPF = 2, ///< Yet Another PathFinder
 
};
0 comments (0 inline, 0 general)