(svn r19345) -Feature: Realistic acceleration for road vehicles.

This commit is contained in:
terkhen
2010-03-06 12:56:57 +00:00
parent e770b3d6bb
commit c958c2c31f
9 changed files with 77 additions and 11 deletions

View File

@@ -64,6 +64,7 @@
#include "company_base.h"
#include "engine_base.h"
#include "smallmap_gui.h"
#include "roadveh.h"
#include "void_map.h"
#include "station_base.h"
@@ -774,6 +775,25 @@ static bool TrainSlopeSteepnessChanged(int32 p1)
return true;
}
/**
* This function updates realistic acceleration caches when the setting "Road vehicle acceleration model" is set.
* @param p1 Callback parameter
* @return Always true
*/
static bool RoadVehAccelerationModelChanged(int32 p1)
{
if (_settings_game.vehicle.roadveh_acceleration_model != AM_ORIGINAL) {
RoadVehicle *rv;
FOR_ALL_ROADVEHICLES(rv) {
if (rv->IsRoadVehFront()) {
rv->CargoChanged();
}
}
}
return true;
}
static bool DragSignalsDensityChanged(int32)
{
InvalidateWindowData(WC_BUILD_SIGNAL, 0);