Commit Graph

729 Commits

Author SHA1 Message Date
Jonathan G Rennison
2af2a49887 Revert "(svn r27811) -Change: Remove unused parameters in FreeTrainTrackReservation"
This reverts commit 166e504c13.

These parameters are used for tracerestrict functionality.
2017-03-20 19:16:32 +00:00
Jonathan G Rennison
f9f2d37a8e Merge branch 'master' into tracerestrict
# Conflicts:
#	src/saveload/saveload.cpp
2017-03-20 19:14:48 +00:00
peter1138
166e504c13 (svn r27811) -Change: Remove unused parameters in FreeTrainTrackReservation
FreeTrainTrackReservation is always called with INVALID_TILE
and INVALID_TRACKDIR as second and third arguments, so remove
them and just use those constants instead. (cirdan)
2017-03-20 17:49:44 +00:00
peter1138
040df26e9e (svn r27809) -Codechange: Improve check in UpdateLevelCrossing
In UpdateLevelCrossing, checking if a level crossing is reserved is
cheaper than finding trains on it or approaching it, so do it first. (cirdan)
2017-03-20 08:04:47 +00:00
Jonathan G Rennison
f5e4d8e73a Merge branch 'master' into tracerestrict
# Conflicts:
#	src/rail_gui.cpp
#	src/saveload/saveload.cpp
2017-01-17 19:20:46 +00:00
frosch
a37bb32fd6 (svn r27667) -Codechange: Add VehicleSpriteSeq::GetBounds and Draw. 2016-10-16 14:58:38 +00:00
frosch
f36539837e (svn r27666) -Codechange: Pass vehicle sprites around using a struct VehicleSpriteSeq. 2016-10-16 14:57:56 +00:00
frosch
2a1e955fee (svn r27663) -Codechange: Deduplicate code when rotating crashed vehicles. 2016-10-16 14:56:33 +00:00
frosch
c9f68ede59 (svn r27580) -Fix [FS#6395]: Set date of last service on construction also for wagons and articulated parts. 2016-05-22 11:45:03 +00:00
Jonathan G Rennison
1bb3024534 Fix unreserving through a green PBS signal not setting the state to red.
This also had the side effect of failed reservation attempts through
a reserve-through signal leaving the signal erroneously set to green.
2016-03-01 20:54:03 +00:00
Jonathan G Rennison
817ce019ca Fix use of nullptr which breaks compilation on legacy compilers. 2016-02-04 01:46:23 +00:00
patch-import
82cab7f31c Tracerestrict: Import "Long Reserve" feature.
https://github.com/KeldorKatarn/OpenTTD_PatchPack

Minor code de-duplications.
2016-01-20 21:49:53 +00:00
frosch
51787a3465 (svn r27419) -Fix [FS#6369]: CmdSellRailWagon did not revert all actions properly when no orderlist could be allocated. (Juanjo) 2015-10-30 16:18:39 +00:00
Jonathan G Rennison
06a1d7c5c9 Add reserve through action to trace restrict programs.
This only changes the behaviour of PBS reservations which
would otherwise terminate at a PBS signal.
If the signal restriction sets the reserve through state,
the reservation continues through the signal, and the signal
is set to green.
2015-09-02 02:12:02 +01:00
frosch
bba85a6e01 (svn r27209) -Add: Draw path reservation on the whole bridge, not only on the bridge heads. 2015-03-28 14:04:06 +00:00
frosch
8767a11d60 (svn r27134) -Codechange: Simplify GUI scaling by adding UnScaleGUI() and ScaleGUITrad(). 2015-02-01 20:54:24 +00:00
rubidium
0c2f4bdc2b (svn r27020) -Cleanup: some coding style consistency improvements (mostly spaces) 2014-10-15 18:31:37 +00:00
peter1138
f7f49c15a3 (svn r26951) -Codechange: Do the GUI-scale dance for vehicle, depot, and purchase lists. 2014-10-04 16:40:23 +00:00
peter1138
49dafc0848 (svn r26907) -Codechange: Scale engine purchase list to GUI zoom level for multihead engines. 2014-09-22 13:13:02 +00:00
rubidium
ac269a3f08 (svn r26863) -Codechange: move a number of Vehicle* functions into the Vehicle class 2014-09-20 15:31:26 +00:00
fonsinchen
d49dad9f9c (svn r26546) -Codechange: Make order wait_time, travel_time and max_speed private 2014-05-01 14:48:44 +00:00
rubidium
2be4215f43 (svn r26482) -Codechange: add an include that allows us to undefine/redefine "unsafe" functions to prevent them from being used, and thus having to care about certain aspects of their return values 2014-04-23 20:13:33 +00:00
frosch
eb6974179d (svn r26317) -Fix [FS#5897]: Check whether NewGRF change vehicle capacity when they are not supposed to, and truncate cargo appropiately if they are allowed to. 2014-02-07 23:48:56 +00:00
rubidium
a498a56573 (svn r26130) -Codechange: add some guards against using invalid image indices 2013-11-26 16:08:58 +00:00
rubidium
f84b67ea73 (svn r26129) -Fix: remove dead code; it could be made to do what it did, but then it would be inconsistent with moving vehicles around 2013-11-26 15:30:41 +00:00
rubidium
14f5d55f6c (svn r26126) -Cleanup: remove unneeded check for NULL 2013-11-26 14:52:28 +00:00
frosch
f12d0c09ec (svn r26026) -Fix (r25648) [FS#5775-ish]: Invalidate vehicle colour palette again when rearranging consist, reversing, ... 2013-11-17 16:01:50 +00:00
rubidium
41d9da548d (svn r25955) -Fix [FS#5723]: Train's "force proceed" status gets reset when the track on the other side of the tile has a signal (adf88) 2013-11-08 22:24:21 +00:00
frosch
6bceb8b7ab (svn r25946) -Add: [NewGRF Debuggnig] Inspecting other vehicles in a chain. 2013-11-07 18:17:21 +00:00
frosch
4fe2a3d75d (svn r25744) -Fix (r25648): [NewGRF] Also invalidate vehicle colour palette when rearranging consists. 2013-08-25 15:43:52 +00:00
frosch
34c9d8b77c (svn r25698) -Fix [FS#5700]: Autoreplace/renew also refits free wagons. 2013-08-06 21:01:14 +00:00
frosch
206616bf37 (svn r25648) -Change [FS#5669]: [NewGRF] Invalidate vehicle recolour palette during (un)loading. 2013-08-04 14:02:27 +00:00
rubidium
46df11b74a (svn r25319) -Fix [FS#5570]: crash when train with reserved cargo vanishes 2013-06-04 15:04:59 +00:00
rubidium
6b746167e4 (svn r25259) -Codechange: track capacities and usage of links 2013-05-19 14:22:04 +00:00
michi_cc
ac13b8baa0 (svn r25200) -Fix (r24846): The level crossing sound is an ambient sound and not a new year sound. 2013-04-24 00:37:06 +00:00
frosch
c5d7445704 (svn r25185) -Fix [FS#5508]: Remove ambivalent functions CargoList::Empty() and Count(), and replace them with VehicleCargoList::StoredCount(), TotalCount(), StationCargoList::AvailableCount() and TotalCount(). (fonsinchen) 2013-04-13 13:42:08 +00:00
frosch
e2db0c5e26 (svn r25167) -Fix [FS#5523] (r24832): Original train and rv acceleration did no longer respect bridge speed limits. 2013-04-08 19:55:24 +00:00
rubidium
58ec317c5a (svn r24998) -Fix [FS#5137]: Set vehicle's service interval is percent flag appropriately on creation (peter1138) 2013-02-14 17:24:55 +00:00
rubidium
2c67dc3d9f (svn r24994) -Codechange: Replace access to service_interval with accessors (peter1138) 2013-02-14 17:04:01 +00:00
peter1138
1e10e91fde (svn r24905) -Feature(ish): Implement station randomisation triggers. 2013-01-11 07:39:25 +00:00
planetmaker
f00d9976f9 (svn r24900) -Fix [FS#5389]: Comments with typos (most fixes supplied by Eagle_rainbow) 2013-01-08 22:46:42 +00:00
frosch
336a93a9d8 (svn r24846) -Add: Advanced settings to disable certain sound effects. 2012-12-23 21:09:09 +00:00
michi_cc
bac2b4c25d (svn r24839) -Feature [FS#5271]: [NewGRF] Support oversized purchase list sprites. (Based on patch by Eddi) 2012-12-23 01:00:25 +00:00
michi_cc
68b078761d (svn r24834) -Fix [FS#5396]: The autorefit dropdown in the order GUI wasn't always updated when modifying vehicle consists. 2012-12-20 19:44:06 +00:00
michi_cc
37da99ab90 (svn r24833) -Codechange: Replace magic numbers for invalidating vehicle-related windows with an enum. 2012-12-20 19:44:02 +00:00
michi_cc
009d20e990 (svn r24832) -Fix [FS#5397]: [NewGRF] Take bridge speed limits into account for vehicle variable 4C. 2012-12-20 19:43:58 +00:00
michi_cc
36ccbe5188 (svn r24831) -Fix [FS#5398]: [NewGRF] Incorrect values are better than a crash when a NewGRF queries vehicle variable 4C before vehicle initialisation is completed. 2012-12-20 19:43:54 +00:00
frosch
076e69a2d8 (svn r24713) -Fix [FS#5262]: [NewGRF] Tolerate old NewGRFs returning invalid values via CB 11. 2012-11-12 20:13:02 +00:00
frosch
358a2bd6ed (svn r24384) -Fix [FS#5188-ish]: Make IsInDepot() functions behave consistent across vehicle types and add IsChainInDepot instead, if that is what shall be checked. 2012-07-07 15:39:46 +00:00
frosch
df9a6d24a0 (svn r24382) -Fix: Call Vehicle::IsStoppedInDepot only for the first vehicle in a chain (i.e. primary vehicle or free wagon). 2012-07-07 15:35:28 +00:00