diff options
author | Darkvater <Darkvater@openttd.org> | 2006-12-01 00:09:13 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2006-12-01 00:09:13 +0000 |
commit | fc1a90b6630a65c7164eefea0abd0e76a9ce2b98 (patch) | |
tree | 34e228c15bbd169f5c13601b61aa43ae9e3b95ba /rail_cmd.c | |
parent | 3762f8d9d25fb5acf2abbdeec3bb40cb06c991d3 (diff) | |
download | openttd-fc1a90b6630a65c7164eefea0abd0e76a9ce2b98.tar.xz |
(svn r7313) -Codechange: Calling invalidate data on a window will surely warrant a redraw, so call
that after the WE_INVALIDATE_DATA event and remove (some of) the superflouous calls.
Diffstat (limited to 'rail_cmd.c')
-rw-r--r-- | rail_cmd.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/rail_cmd.c b/rail_cmd.c index cb5ff4213..19af91a9b 100644 --- a/rail_cmd.c +++ b/rail_cmd.c @@ -2010,11 +2010,10 @@ static uint32 VehicleEnter_Track(Vehicle *v, TileIndex tile, int x, int y) v->u.rail.track = 0x80, v->vehstatus |= VS_HIDDEN; /* hide it */ v->direction = ReverseDir(v->direction); - InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); - if (v->next == NULL) - VehicleEnterDepot(v); + if (v->next == NULL) VehicleEnterDepot(v); v->tile = tile; - InvalidateWindow(WC_VEHICLE_DEPOT, tile); + + InvalidateWindowData(WC_VEHICLE_DEPOT, v->tile); return 4; } } else if (fract_coord_leave == fract_coord) { |