Mercurial > hg > openttd
changeset 18220:8a968f3fbda2 draft
(svn r23050) -Fix: [NewGRF] When vehicles break down, update the image cache after changing the vehicle state to make fish happy.
author | frosch <frosch@openttd.org> |
---|---|
date | Fri, 21 Oct 2011 21:03:40 +0000 |
parents | a72440f763b9 |
children | fb84ba2c94a2 |
files | src/vehicle.cpp |
diffstat | 1 files changed, 5 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/vehicle.cpp +++ b/src/vehicle.cpp @@ -1090,10 +1090,6 @@ this->breakdowns_since_last_service++; } - this->MarkDirty(); - SetWindowDirty(WC_VEHICLE_VIEW, this->index); - SetWindowDirty(WC_VEHICLE_DETAILS, this->index); - if (this->type == VEH_AIRCRAFT) { /* Aircraft just need this flag, the rest is handled elsewhere */ this->vehstatus |= VS_AIRCRAFT_BROKEN; @@ -1111,6 +1107,11 @@ if (u != NULL) u->animation_state = this->breakdown_delay * 2; } } + + this->MarkDirty(); // Update graphics after speed is zeroed + SetWindowDirty(WC_VEHICLE_VIEW, this->index); + SetWindowDirty(WC_VEHICLE_DETAILS, this->index); + /* FALL THROUGH */ case 1: /* Aircraft breakdowns end only when arriving at the airport */