forked from mirror/OpenTTD
(svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes.
This commit is contained in:
@@ -687,11 +687,9 @@ void SetAircraftPosition(Aircraft *v, int x, int y, int z)
|
||||
v->y_pos = y;
|
||||
v->z_pos = z;
|
||||
|
||||
v->cur_image = v->GetImage(v->direction);
|
||||
v->UpdateViewport(true, false);
|
||||
if (v->subtype == AIR_HELICOPTER) v->Next()->Next()->cur_image = GetRotorImage(v);
|
||||
|
||||
VehicleMove(v, true);
|
||||
|
||||
Aircraft *u = v->Next();
|
||||
|
||||
int safe_x = Clamp(x, 0, MapMaxX() * TILE_SIZE);
|
||||
@@ -1278,9 +1276,8 @@ TileIndex Aircraft::GetOrderStationLocation(StationID station)
|
||||
|
||||
void Aircraft::MarkDirty()
|
||||
{
|
||||
this->cur_image = this->GetImage(this->direction);
|
||||
this->UpdateViewport(false, false);
|
||||
if (this->subtype == AIR_HELICOPTER) this->Next()->Next()->cur_image = GetRotorImage(this);
|
||||
MarkSingleVehicleDirty(this);
|
||||
}
|
||||
|
||||
static void CrashAirplane(Aircraft *v)
|
||||
|
Reference in New Issue
Block a user