YAPF: Prevent user for configuring signal penalties to negative values

Warn if signal penalty polynomial goes negative, and clamp to non-negative
This commit is contained in:
Jonathan G Rennison
2020-01-17 19:23:03 +00:00
parent 07f5b86dfc
commit bb363695fc
5 changed files with 34 additions and 2 deletions

View File

@@ -1228,6 +1228,14 @@ static bool EnableSingleVehSharedOrderGuiChanged(int32)
return true;
}
static bool CheckYapfRailSignalPenalties(int32)
{
extern void YapfCheckRailSignalPenalties();
YapfCheckRailSignalPenalties();
return true;
}
/** Checks if any settings are set to incorrect values, and sets them to correct values in that case. */
static void ValidateSettings()
{