Refactor CallVehicleTicks vehicle loop

This commit is contained in:
Jonathan G Rennison
2019-01-25 20:17:15 +00:00
parent 5995e825bc
commit e5b61e0b6c
14 changed files with 230 additions and 99 deletions

View File

@@ -380,6 +380,8 @@ CommandCost CmdBuildAircraft(TileIndex tile, DoCommandFlag flags, const Engine *
u->SetNext(w);
w->UpdatePosition();
}
InvalidateVehicleTickCaches();
}
return CommandCost();
@@ -2131,8 +2133,6 @@ bool Aircraft::Tick()
{
if (!this->IsNormalAircraft()) return true;
PerformanceAccumulator framerate(PFE_GL_AIRCRAFT);
this->tick_counter++;
if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++;