(svn r21989) -Fix (r21954): Vehicle status bar glitches on speed changes.

This commit is contained in:
frosch 2011-02-05 21:13:54 +00:00
parent 7a5d9299ff
commit 0b816dd007

View File

@ -340,9 +340,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
FORCEINLINE void SetLastSpeed()
{
if (this->cur_speed != this->gcache.last_speed) {
if ((this->gcache.last_speed == 0) != (this->cur_speed == 0)) {
SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, VVW_WIDGET_START_STOP_VEH);
}
SetWindowWidgetDirty(WC_VEHICLE_VIEW, this->index, VVW_WIDGET_START_STOP_VEH);
this->gcache.last_speed = this->cur_speed;
}
}