summaryrefslogtreecommitdiff
path: root/roadveh_cmd.c
diff options
context:
space:
mode:
authortron <tron@openttd.org>2006-06-27 21:25:53 +0000
committertron <tron@openttd.org>2006-06-27 21:25:53 +0000
commit2b27073156f40df263cf653263488b8d72a76236 (patch)
tree1bfdb9c99b43fdc3b07ac13cbed4259a06d34f6f /roadveh_cmd.c
parentc126ce110ee33bffe07dac5283d8a1648dc662b7 (diff)
downloadopenttd-2b27073156f40df263cf653263488b8d72a76236.tar.xz
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
Diffstat (limited to 'roadveh_cmd.c')
-rw-r--r--roadveh_cmd.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index fc939df19..d0a3c0a93 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -1625,7 +1625,6 @@ static void CheckIfRoadVehNeedsService(Vehicle *v)
void OnNewDay_RoadVeh(Vehicle *v)
{
int32 cost;
- Station *st;
if ((++v->day_counter & 7) == 0) DecreaseVehicleValue(v);
if (v->u.road.blocked_ctr == 0) CheckVehicleBreakdown(v);
@@ -1646,19 +1645,19 @@ void OnNewDay_RoadVeh(Vehicle *v)
/* update destination */
if (v->current_order.type == OT_GOTO_STATION && v->u.road.slot == NULL && !(v->vehstatus & VS_CRASHED)) {
- RoadStop *rs;
- RoadStop *best = NULL;
-
- st = GetStation(v->current_order.station);
- rs = GetPrimaryRoadStop(st, v->cargo_type == CT_PASSENGERS ? RS_BUS : RS_TRUCK);
+ Station* st = GetStation(v->current_order.station);
+ RoadStop* rs = GetPrimaryRoadStop(st, v->cargo_type == CT_PASSENGERS ? RS_BUS : RS_TRUCK);
+ RoadStop* best = NULL;
if (rs != NULL) {
if (DistanceManhattan(v->tile, st->xy) < 16) {
uint dist, badness;
uint minbadness = UINT_MAX;
- DEBUG(ms, 2) ("Multistop: Attempting to obtain a slot for vehicle %d (index %d) at station %d (0x%X)", v->unitnumber,
- v->index, st->index, st->xy);
+ DEBUG(ms, 2) (
+ "Multistop: Attempting to obtain a slot for vehicle %d (index %d) at station %d (0x%X)",
+ v->unitnumber, v->index, st->index, st->xy
+ );
/* Now we find the nearest road stop that has a free slot */
for (; rs != NULL; rs = rs->next) {
dist = RoadFindPathToStop(v, rs->xy);