Refactor CallVehicleTicks vehicle loop
This commit is contained in:
@@ -332,6 +332,8 @@ CommandCost CmdBuildRoadVehicle(TileIndex tile, DoCommandFlag flags, const Engin
|
||||
v->UpdatePosition();
|
||||
|
||||
CheckConsistencyOfArticulatedVehicle(v);
|
||||
|
||||
InvalidateVehicleTickCaches();
|
||||
}
|
||||
|
||||
return CommandCost();
|
||||
@@ -1665,10 +1667,6 @@ Money RoadVehicle::GetRunningCost() const
|
||||
|
||||
bool RoadVehicle::Tick()
|
||||
{
|
||||
PerformanceAccumulator framerate(PFE_GL_ROADVEHS);
|
||||
|
||||
this->tick_counter++;
|
||||
|
||||
if (this->IsFrontEngine()) {
|
||||
if (!(this->IsRoadVehicleStopped())) this->running_ticks++;
|
||||
return RoadVehController(this);
|
||||
|
Reference in New Issue
Block a user