mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-08-18 20:19:11 +00:00
(svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance
This commit is contained in:
@@ -1771,7 +1771,7 @@ static void ReverseTrainDirection(Train *v)
|
||||
v->ConsistChanged(true);
|
||||
|
||||
/* update all images */
|
||||
for (Vehicle *u = v; u != NULL; u = u->Next()) u->UpdateViewport(false, false);
|
||||
for (Train *u = v; u != NULL; u = u->Next()) u->UpdateViewport(false, false);
|
||||
|
||||
/* update crossing we were approaching */
|
||||
if (crossing != INVALID_TILE) UpdateLevelCrossing(crossing);
|
||||
@@ -2806,7 +2806,7 @@ TileIndex Train::GetOrderStationLocation(StationID station)
|
||||
|
||||
void Train::MarkDirty()
|
||||
{
|
||||
Vehicle *v = this;
|
||||
Train *v = this;
|
||||
do {
|
||||
v->UpdateViewport(false, false);
|
||||
} while ((v = v->Next()) != NULL);
|
||||
|
Reference in New Issue
Block a user