Changeset - r23179:9d0534b80a85
[Not reviewed]
master
0 2 0
Peter Nelson - 5 years ago 2019-01-19 20:59:27
peter@fuzzle.org
Change: Invalidate ship path caches if pathfinder choice or forbid-90-degree turns are changed.
2 files changed with 12 insertions and 0 deletions:
0 comments (0 inline, 0 general)
src/settings.cpp
Show inline comments
 
@@ -1312,6 +1312,15 @@ static bool MaxVehiclesChanged(int32 p1)
 
	return true;
 
}
 

	
 
static bool InvalidateShipPathCache(int32 p1)
 
{
 
	Ship *s;
 
	FOR_ALL_SHIPS(s) {
 
		s->path.clear();
 
	}
 
	return true;
 
}
 

	
 

	
 
#ifdef ENABLE_NETWORK
 

	
src/table/settings.ini
Show inline comments
 
@@ -42,6 +42,7 @@ static bool InvalidateCompanyInfrastruct
 
static bool InvalidateCompanyWindow(int32 p1);
 
static bool ZoomMinMaxChanged(int32 p1);
 
static bool MaxVehiclesChanged(int32 p1);
 
static bool InvalidateShipPathCache(int32 p1);
 

	
 
#ifdef ENABLE_NETWORK
 
static bool UpdateClientName(int32 p1);
 
@@ -820,6 +821,7 @@ var      = pf.forbid_90_deg
 
def      = false
 
str      = STR_CONFIG_SETTING_FORBID_90_DEG
 
strhelp  = STR_CONFIG_SETTING_FORBID_90_DEG_HELPTEXT
 
proc     = InvalidateShipPathCache
 
cat      = SC_EXPERT
 

	
 
[SDT_VAR]
 
@@ -942,6 +944,7 @@ interval = 1
 
str      = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS
 
strhelp  = STR_CONFIG_SETTING_PATHFINDER_FOR_SHIPS_HELPTEXT
 
strval   = STR_CONFIG_SETTING_PATHFINDER_OPF
 
proc     = InvalidateShipPathCache
 
cat      = SC_EXPERT
 

	
 
[SDT_BOOL]
0 comments (0 inline, 0 general)