summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authorbjarni <bjarni@openttd.org>2005-01-24 22:24:47 +0000
committerbjarni <bjarni@openttd.org>2005-01-24 22:24:47 +0000
commite006f89aa3e750ead8cce290d86ee22b2190a582 (patch)
treea40c92393f20c790b63d3d4ac0824541652cd3c3 /roadveh_cmd.c
parentffb2c4de778acd8bb35b43c44b65bb10af05e137 (diff)
downloadopenttd-e006f89aa3e750ead8cce290d86ee22b2190a582.tar.xz
(svn r1652) Fix: train and road vehicle lists are now redrawn when vehicles enters/leaves a depot (Hackykid)
fix: the ship status bar was not updated properly after a breakdown if show_speed was off (Hackykid)
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index 97429a1af..c78aa79d8 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -515,7 +515,7 @@ static void RoadVehCheckTrainCrash(Vehicle *v)
// Make sure it's a road/rail crossing
if (!IsTileType(tile, MP_STREET) ||
- (_map5[tile] & 0xF0) != 0x10)
+ (_map5[tile] & 0xF0) != 0x10)
return;
if (VehicleFromPos(tile, v, (VehicleFromPosProc*)EnumCheckRoadVehCrashTrain) != NULL)
@@ -671,7 +671,7 @@ static void *EnumCheckRoadVehClose(Vehicle *v, RoadVehFindData *rvf)
(_dists[v->direction] > 0 && (x_diff >= _dists[v->direction] || x_diff < 0)) ||
(_dists[v->direction+8] < 0 && (y_diff <= _dists[v->direction+8] || y_diff > 0)) ||
(_dists[v->direction+8] > 0 && (y_diff >= _dists[v->direction+8] || y_diff < 0)))
- return NULL;
+ return NULL;
return v;
}
@@ -1408,6 +1408,7 @@ void RoadVehEnterDepot(Vehicle *v)
}
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
+ InvalidateWindowClasses(WC_ROADVEH_LIST);
}
static void AgeRoadVehCargo(Vehicle *v)
@@ -1504,7 +1505,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
SubtractMoneyFromPlayerFract(v->owner, cost);
InvalidateWindow(WC_VEHICLE_DETAILS, v->index);
- InvalidateWindow(WC_ROADVEH_LIST, v->owner);
+ InvalidateWindowClasses(WC_ROADVEH_LIST);
}
void HandleClickOnRoadVeh(Vehicle *v)