(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 d82475cf88
commit 9aa185572b

View File

@@ -340,9 +340,7 @@ struct GroundVehicle : public SpecializedVehicle<T, Type> {
FORCEINLINE void SetLastSpeed() FORCEINLINE void SetLastSpeed()
{ {
if (this->cur_speed != this->gcache.last_speed) { 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; this->gcache.last_speed = this->cur_speed;
} }
} }