(svn r18838) -Codechange [FS#3524]: reorganisation of the train acceleration code plus some minor optimisations (Terkhen)

This commit is contained in:
rubidium
2010-01-16 22:30:04 +00:00
parent 119de3a5fe
commit ff69edfc17
4 changed files with 231 additions and 108 deletions

View File

@@ -745,6 +745,21 @@ static bool TrainAccelerationModelChanged(int32 p1)
return true;
}
/**
* This function updates the train acceleration cache after a steepness change.
* @param p1 Callback parameter.
* @return Always true.
*/
static bool TrainSlopeSteepnessChanged(int32 p1)
{
Train *t;
FOR_ALL_TRAINS(t) {
if (t->IsFrontEngine()) t->CargoChanged();
}
return true;
}
static bool DragSignalsDensityChanged(int32)
{
InvalidateWindowData(WC_BUILD_SIGNAL, 0);