summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorpeter1138 <peter1138@openttd.org>2006-02-11 10:45:20 +0000
committerpeter1138 <peter1138@openttd.org>2006-02-11 10:45:20 +0000
commitefe76c22e6a980eb8699de8fd93e18b7c2add375 (patch)
tree84809d09091d30093cc1335e7d5e784ac6912304
parent6f5f3101b6e785b88de2470babdb3b5a1a61f054 (diff)
downloadopenttd-efe76c22e6a980eb8699de8fd93e18b7c2add375.tar.xz
(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
-rw-r--r--oldloader.c2
-rw-r--r--roadveh_cmd.c6
-rw-r--r--vehicle.c2
-rw-r--r--vehicle.h2
4 files changed, 6 insertions, 6 deletions
diff --git a/oldloader.c b/oldloader.c
index 57b9f5ec5..b3cfa27e2 100644
--- a/oldloader.c
+++ b/oldloader.c
@@ -1083,7 +1083,7 @@ static const OldChunks vehicle_train_chunk[] = {
static const OldChunks vehicle_road_chunk[] = {
OCL_SVAR( OC_UINT8, VehicleRoad, state ),
OCL_SVAR( OC_UINT8, VehicleRoad, frame ),
- OCL_SVAR( OC_UINT16, VehicleRoad, unk2 ),
+ OCL_SVAR( OC_UINT16, VehicleRoad, blocked_ctr ),
OCL_SVAR( OC_UINT8, VehicleRoad, overtaking ),
OCL_SVAR( OC_UINT8, VehicleRoad, overtaking_ctr ),
OCL_SVAR( OC_UINT16, VehicleRoad, crashed_ctr ),
diff --git a/roadveh_cmd.c b/roadveh_cmd.c
index e381acddd..0964aaf39 100644
--- a/roadveh_cmd.c
+++ b/roadveh_cmd.c
@@ -741,11 +741,11 @@ static Vehicle *RoadVehFindCloseTo(Vehicle *v, int x, int y, byte dir)
// drive just through it. The ultimate backup-code of TTD.
// It can be disabled.
if (u == NULL) {
- v->u.road.unk2 = 0;
+ v->u.road.blocked_ctr = 0;
return NULL;
}
- if (++v->u.road.unk2 > 1480)
+ if (++v->u.road.blocked_ctr > 1480)
return NULL;
return u;
@@ -1570,7 +1570,7 @@ void OnNewDay_RoadVeh(Vehicle *v)
if ((++v->day_counter & 7) == 0)
DecreaseVehicleValue(v);
- if (v->u.road.unk2 == 0)
+ if (v->u.road.blocked_ctr == 0)
CheckVehicleBreakdown(v);
AgeVehicle(v);
diff --git a/vehicle.c b/vehicle.c
index ede33bfd6..7467198d5 100644
--- a/vehicle.c
+++ b/vehicle.c
@@ -2161,7 +2161,7 @@ static const SaveLoad _roadveh_desc[] = {
SLE_INCLUDEX(0, INC_VEHICLE_COMMON),
SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,state), SLE_UINT8),
SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,frame), SLE_UINT8),
- SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,unk2), SLE_UINT16),
+ SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,blocked_ctr), SLE_UINT16),
SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,overtaking), SLE_UINT8),
SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,overtaking_ctr),SLE_UINT8),
SLE_VARX(offsetof(Vehicle,u)+offsetof(VehicleRoad,crashed_ctr), SLE_UINT16),
diff --git a/vehicle.h b/vehicle.h
index 5936c62fa..46814b59e 100644
--- a/vehicle.h
+++ b/vehicle.h
@@ -100,7 +100,7 @@ typedef struct VehicleAir {
typedef struct VehicleRoad {
byte state;
byte frame;
- uint16 unk2;
+ uint16 blocked_ctr;
byte overtaking;
byte overtaking_ctr;
uint16 crashed_ctr;