summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-05-04 22:38:36 +0000
committerrubidium <rubidium@openttd.org>2007-05-04 22:38:36 +0000
commitb76cc8c96b6a43e56addb5d6fe32513e7e0ea96f (patch)
treebd897a4b2c317680e808a00a3c12f0f238b07377
parente81906c62d0f706ec98e95b4ed9dd039009fe167 (diff)
downloadopenttd-b76cc8c96b6a43e56addb5d6fe32513e7e0ea96f.tar.xz
(svn r9784) -Codechange: remove unused variable.
-rw-r--r--src/console_cmds.cpp2
-rw-r--r--src/order_cmd.cpp2
-rw-r--r--src/train_cmd.cpp8
-rw-r--r--src/vehicle.cpp3
-rw-r--r--src/vehicle.h1
5 files changed, 1 insertions, 15 deletions
diff --git a/src/console_cmds.cpp b/src/console_cmds.cpp
index 725f4fe93..5ab671150 100644
--- a/src/console_cmds.cpp
+++ b/src/console_cmds.cpp
@@ -142,8 +142,6 @@ DEF_CONSOLE_CMD(ConStopAllVehicles)
FOR_ALL_VEHICLES(v) {
/* Code ripped from CmdStartStopTrain. Can't call it, because of
* ownership problems, so we'll duplicate some code, for now */
- if (v->type == VEH_TRAIN)
- v->u.rail.days_since_order_progr = 0;
v->vehstatus |= VS_STOPPED;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
diff --git a/src/order_cmd.cpp b/src/order_cmd.cpp
index eb94a1bc2..08c404785 100644
--- a/src/order_cmd.cpp
+++ b/src/order_cmd.cpp
@@ -581,8 +581,6 @@ int32 CmdSkipOrder(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
v->cur_order_index = b;
- if (v->type == VEH_TRAIN) v->u.rail.days_since_order_progr = 0;
-
if (v->type == VEH_ROAD) ClearSlot(v);
/* NON-stop flag is misused to see if a train is in a station that is
diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp
index d07c7556f..c63ba7b79 100644
--- a/src/train_cmd.cpp
+++ b/src/train_cmd.cpp
@@ -1265,7 +1265,6 @@ int32 CmdStartStopTrain(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
DeleteVehicleNews(p1, STR_8814_TRAIN_IS_WAITING_IN_DEPOT);
}
- v->u.rail.days_since_order_progr = 0;
v->vehstatus ^= VS_STOPPED;
InvalidateWindowWidget(WC_VEHICLE_VIEW, v->index, STATUS_BAR);
InvalidateWindow(WC_VEHICLE_DEPOT, v->tile);
@@ -1965,7 +1964,6 @@ int32 CmdSendTrainToDepot(TileIndex tile, uint32 flags, uint32 p1, uint32 p2)
if (p2 & DEPOT_DONT_CANCEL) return CMD_ERROR; // Requested no cancelation of depot orders
if (flags & DC_EXEC) {
if (HASBIT(v->current_order.flags, OFB_PART_OF_ORDERS)) {
- v->u.rail.days_since_order_progr = 0;
v->cur_order_index++;
}
@@ -2537,11 +2535,6 @@ static void HandleTrainLoading(Vehicle *v, bool mode)
case OT_LOADING: {
if (mode) return;
- /* don't mark the train as lost if we're loading on the final station. */
- if (v->current_order.flags & OF_NON_STOP) {
- v->u.rail.days_since_order_progr = 0;
- }
-
if (--v->load_unload_time_rem) return;
if (CanFillVehicle(v)) {
@@ -2564,7 +2557,6 @@ static void HandleTrainLoading(Vehicle *v, bool mode)
default: return;
}
- v->u.rail.days_since_order_progr = 0;
v->cur_order_index++;
InvalidateVehicleOrder(v);
}
diff --git a/src/vehicle.cpp b/src/vehicle.cpp
index 3d2642d36..0722855fe 100644
--- a/src/vehicle.cpp
+++ b/src/vehicle.cpp
@@ -2250,7 +2250,6 @@ void VehicleEnterDepot(Vehicle *v)
if (HASBIT(t.flags, OFB_PART_OF_ORDERS)) {
/* Part of orders */
- if (v->type == VEH_TRAIN) v->u.rail.days_since_order_progr = 0;
v->cur_order_index++;
} else if (HASBIT(t.flags, OFB_HALT_IN_DEPOT)) {
/* Force depot visit */
@@ -2746,7 +2745,7 @@ static const SaveLoad _train_desc[] = {
SLE_VARX(cpp_offsetof(Vehicle, u) + cpp_offsetof(VehicleRail, track), SLE_UINT8),
SLE_CONDVARX(cpp_offsetof(Vehicle, u) + cpp_offsetof(VehicleRail, flags), SLE_UINT8, 2, SL_MAX_VERSION),
- SLE_CONDVARX(cpp_offsetof(Vehicle, u) + cpp_offsetof(VehicleRail, days_since_order_progr), SLE_UINT16, 2, SL_MAX_VERSION),
+ SLE_CONDNULL(2, 2, 59),
SLE_CONDNULL(2, 2, 19),
/* reserve extra space in savegame here. (currently 11 bytes) */
diff --git a/src/vehicle.h b/src/vehicle.h
index 810f1ba2d..62fb935b2 100644
--- a/src/vehicle.h
+++ b/src/vehicle.h
@@ -108,7 +108,6 @@ enum EffectVehicle {
struct VehicleRail {
uint16 last_speed; // NOSAVE: only used in UI
uint16 crash_anim_pos;
- uint16 days_since_order_progr;
/* cached values, recalculated on load and each time a vehicle is added to/removed from the consist. */
uint16 cached_max_speed; // max speed of the consist. (minimum of the max speed of all vehicles in the consist)