mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-06 14:27:16 +00:00
(svn r3589) - Rename u.road.unk2 to u.road.blocked_ctr
This commit is contained in:
parent
6f5f3101b6
commit
efe76c22e6
@ -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 ),
|
||||
|
@ -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);
|
||||
|
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user