summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-19 20:32:33 +0000
committerrubidium <rubidium@openttd.org>2010-08-19 20:32:33 +0000
commit64c178467d602c6b4d225dc28d774076311e4805 (patch)
treeac47654c560f4b14dc593a26e294c4f92c545e89
parentca0cd109f21a4f3cf54e630287f39951e4e5c8c3 (diff)
downloadopenttd-64c178467d602c6b4d225dc28d774076311e4805.tar.xz
(svn r20569) -Cleanup: the change timetable command doesn't need the packed bit anymore
-rw-r--r--src/timetable_cmd.cpp13
1 files changed, 3 insertions, 10 deletions
diff --git a/src/timetable_cmd.cpp b/src/timetable_cmd.cpp
index d46781ff9..fff2fd5fb 100644
--- a/src/timetable_cmd.cpp
+++ b/src/timetable_cmd.cpp
@@ -53,11 +53,8 @@ static void ChangeTimetable(Vehicle *v, VehicleOrderID order_number, uint16 time
* - p1 = (bit 16-23) - Order index to modify.
* - p1 = (bit 24) - Whether to change the waiting time or the travelling
* time.
- * - p1 = (bit 25) - Whether p2 contains waiting and travelling time.
* @param p2 The amount of time to wait.
- * - p2 = (bit 0-15) - Waiting or travelling time as specified by p1 bit 24 if p1 bit 25 is not set,
- * Travelling time if p1 bit 25 is set.
- * - p2 = (bit 16-31) - Waiting time if p1 bit 25 is set
+ * - p2 = (bit 0-15) - Waiting or travelling time as specified by p1 bit 24
* @param text unused
* @return the cost of this operation or an error
*/
@@ -77,15 +74,11 @@ CommandCost CmdChangeTimetable(TileIndex tile, DoCommandFlag flags, uint32 p1, u
Order *order = v->GetOrder(order_number);
if (order == NULL) return CMD_ERROR;
- bool packed_time = HasBit(p1, 25);
- bool is_journey = HasBit(p1, 24) || packed_time;
+ bool is_journey = HasBit(p1, 24);
int wait_time = order->wait_time;
int travel_time = order->travel_time;
- if (packed_time) {
- travel_time = GB(p2, 0, 16);
- wait_time = GB(p2, 16, 16);
- } else if (is_journey) {
+ if (is_journey) {
travel_time = GB(p2, 0, 16);
} else {
wait_time = GB(p2, 0, 16);