(svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes.
This commit is contained in:
@@ -229,8 +229,7 @@ static void HandleBrokenShip(Vehicle *v)
|
||||
|
||||
void Ship::MarkDirty()
|
||||
{
|
||||
this->cur_image = this->GetImage(this->direction);
|
||||
MarkSingleVehicleDirty(this);
|
||||
this->UpdateViewport(false, false);
|
||||
}
|
||||
|
||||
static void PlayShipSound(const Vehicle *v)
|
||||
@@ -283,9 +282,7 @@ void Ship::UpdateDeltaXY(Direction direction)
|
||||
|
||||
void RecalcShipStuff(Vehicle *v)
|
||||
{
|
||||
v->UpdateDeltaXY(v->direction);
|
||||
v->cur_image = v->GetImage(v->direction);
|
||||
v->MarkDirty();
|
||||
v->UpdateViewport(false, true);
|
||||
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
|
||||
}
|
||||
|
||||
@@ -708,9 +705,7 @@ static void ShipController(Ship *v)
|
||||
v->z_pos = GetSlopeZ(gp.x, gp.y);
|
||||
|
||||
getout:
|
||||
v->UpdateDeltaXY(dir);
|
||||
v->cur_image = v->GetImage(dir);
|
||||
VehicleMove(v, true);
|
||||
v->UpdateViewport(true, true);
|
||||
return;
|
||||
|
||||
reverse_direction:
|
||||
|
Reference in New Issue
Block a user