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

@@ -839,8 +839,6 @@ reverse_direction:
bool Ship::Tick()
{
PerformanceAccumulator framerate(PFE_GL_SHIPS);
if (!(this->vehstatus & VS_STOPPED)) this->running_ticks++;
ShipController(this);
@@ -924,6 +922,7 @@ CommandCost CmdBuildShip(TileIndex tile, DoCommandFlag flags, const Engine *e, u
v->InvalidateNewGRFCacheOfChain();
v->UpdatePosition();
InvalidateVehicleTickCaches();
}
return CommandCost();