(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
authorpeter1138
Sat, 11 Feb 2006 10:45:20 +0000
changeset 3009 c75f1a8d5ff9
parent 3008 cef26520c91e
child 3010 96b8e2841f8c
(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
oldloader.c
roadveh_cmd.c
vehicle.c
vehicle.h
--- a/oldloader.c	Sat Feb 11 09:24:51 2006 +0000
+++ b/oldloader.c	Sat Feb 11 10:45:20 2006 +0000
@@ -1083,7 +1083,7 @@
 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 ),
--- a/roadveh_cmd.c	Sat Feb 11 09:24:51 2006 +0000
+++ b/roadveh_cmd.c	Sat Feb 11 10:45:20 2006 +0000
@@ -741,11 +741,11 @@
 	//  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 @@
 	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);
--- a/vehicle.c	Sat Feb 11 09:24:51 2006 +0000
+++ b/vehicle.c	Sat Feb 11 10:45:20 2006 +0000
@@ -2161,7 +2161,7 @@
 	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),
--- a/vehicle.h	Sat Feb 11 09:24:51 2006 +0000
+++ b/vehicle.h	Sat Feb 11 10:45:20 2006 +0000
@@ -100,7 +100,7 @@
 typedef struct VehicleRoad {
 	byte state;
 	byte frame;
-	uint16 unk2;
+	uint16 blocked_ctr;
 	byte overtaking;
 	byte overtaking_ctr;
 	uint16 crashed_ctr;