Commit Graph

815 Commits

Author SHA1 Message Date
smatz 1ac51128f5 (svn r21874) -Fix: when a single-vehicle train was reversed while on a slope, its GOINGUP/DOWN weren't swapped 2011-01-21 00:11:13 +00:00
rubidium 922d60f516 (svn r21847) -Fix [FS#4423]: slowing down of trains was done by reducing the speed by 10%, but also when you're just 1% too fast, so limit the slowdown till the new maximum speed 2011-01-19 08:24:38 +00:00
smatz c0b051eb33 (svn r21836) -Fix: when a train was reversed while inside a tunnel/bridge, it wouldn't have (re)set the GOINGUP/DOWN bits after leaving the tunnel/bridge 2011-01-18 20:40:36 +00:00
smatz 772de6b52d (svn r21835) -Codechange: use UpdateStatusAfterSwap() instead of copying the same code three times 2011-01-18 20:06:56 +00:00
rubidium 0c497dd113 (svn r21800) -Fix [FS#3569]: under certain circumstances one could crash a competitor's train; take the lazy non-future proof version of the fix from the 1.0 branch as fixing the real bug is significantly more complex and might even break some backwards compatability if not done perfectly 2011-01-15 09:53:21 +00:00
rubidium 95041ad220 (svn r21529) -Doc: update comment after function name change (Krille) 2010-12-15 23:23:30 +00:00
terkhen 48b7916458 (svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains. 2010-12-14 21:33:53 +00:00
terkhen 12c86a1391 (svn r21518) -Codechange: Rename AccelerationCache to GroundVehicleCache. 2010-12-14 21:28:45 +00:00
rubidium b05d2675fc (svn r21509) -Codechange: rename the rail pathfinders "path_not_found" parameter to "path_found" and remove the ! where the variables are set / read 2010-12-13 21:55:59 +00:00
rubidium 6d831906a3 (svn r21508) -Codechange: move the code to handle the pathfinder's "path found" status to a separate function 2010-12-13 21:55:06 +00:00
rubidium 3cb75db0d4 (svn r21506) -Codechange: rename the train/vehicle lost warning strings to be more generic 2010-12-13 21:53:54 +00:00
rubidium e3b391249d (svn r21505) -Change: generalise the lost_train_warning setting to lost_vehicle_warning 2010-12-13 21:53:23 +00:00
rubidium 49a77e89c4 (svn r21504) -Codechange: move the "lost" bit from the train's flags to vehicle flags 2010-12-13 21:52:39 +00:00
rubidium d2c7f91cbb (svn r21502) -Change/Fix [FS#3991] (r150, r18402): before r18402 a train crash caused 2 "driver" deaths and a flooding 4 (added in r150). In r18402 the counting was merged and the flooding code was taken for counting drivers. Given those numbers were inconsistent (unlike for other vehicles) we better use the real original amount of driver deaths instead of the erroneous amount. 2010-12-13 18:26:09 +00:00
alberth ab50f74d7f (svn r21273) -Codechange: Return values should start at the same line. 2010-11-20 15:44:24 +00:00
rubidium 9af570eab4 (svn r21237) -Codechange: Move HandleLocomotiveSmokeCloud to Vehicle::ShowVisualEffect (Hirundo) 2010-11-18 14:15:27 +00:00
rubidium 34c658b203 (svn r21236) -Codechange: Make the visual effects drawing routine work for all vehicle types (Hirundo) 2010-11-18 14:11:50 +00:00
rubidium b9407f7ca0 (svn r21235) -Codechange: Move Train::UpdateVisualEffect to the Vehicle class (Hirundo) 2010-11-18 14:09:39 +00:00
rubidium 797435f05d (svn r21234) -Codechange: Make Train::UpdateVisualEffect work for all vehicle types (Hirundo) 2010-11-18 14:07:48 +00:00
rubidium f4689f4301 (svn r21233) -Codechange: Introduce an enum to remove some magic numbers from the visual effect code (Hirundo) 2010-11-18 14:04:36 +00:00
rubidium 79c47ef8b0 (svn r21232) -Codechange: Move cached_vis_effect from the TrainCache to the VehicleCache (Hirundo) 2010-11-18 14:03:12 +00:00
rubidium 5a503d505b (svn r21231) -Codechange: Generalize the naming of some settings and variables related to visual effects (Hirundo) 2010-11-18 14:01:20 +00:00
rubidium 31c0ba9d29 (svn r21230) -Fix/Change/Feature: [NewGRF] Make positioning of diesel fumes and electric sparks actually work (Hirundo). 2010-11-18 13:51:54 +00:00
yexo 8578ec7496 (svn r21218) -Fix (r21189)[FS#4236]: don't force a minimum speed when braking 2010-11-16 23:38:05 +00:00
terkhen d7aa9a6bd1 (svn r21205) -Fix [FS#4207]: Under some conditions, group count would be wrong after moving train engines in the depot window. 2010-11-16 12:05:41 +00:00
terkhen eda95bb85c (svn r21189) -Fix: Force a minimum speed for trains when using the realistic acceleration model. 2010-11-14 15:48:24 +00:00
rubidium d1dfb27699 (svn r21136) -Fix [FS#4213]: bridge speed limits should apply to all wagons of a vehicle, not just the head of the vehicle 2010-11-10 20:15:48 +00:00
terkhen 6a38925ca3 (svn r21123) -Codechange: Remove max_speed from the Vehicle class. 2010-11-09 17:43:05 +00:00
terkhen c8a56f17f8 (svn r21097) -Codechange: Unify cached max speed for all vehicle types. 2010-11-06 12:53:31 +00:00
alberth fa13971337 (svn r21088) -Doc: Additions/corrections of doxygen comments. 2010-11-05 16:34:22 +00:00
alberth 7e48d85104 (svn r21060) -Doc: Improved wording of comments (mostly by __ln__) 2010-10-30 17:51:07 +00:00
frosch cb43ece091 (svn r21014) -Fix [FS#4179](r20098): Reversing of trains in stations while last wagon was in a depot or on a bridge-/tunnelhead caused trouble. 2010-10-22 22:51:15 +00:00
rubidium 9badab6454 (svn r20768) -Codechange: unify send-to-depot commands 2010-09-08 18:55:58 +00:00
rubidium 2fb18e975c (svn r20645) -Codechange [FS#4086]: unify the code for checking for breakdown handling as well (Hirundo) 2010-08-28 14:14:37 +00:00
rubidium 702cc96943 (svn r20644) -Codechange [FS#4086]: unify the vehicle breakdown code (Hirundo) 2010-08-28 14:01:50 +00:00
rubidium 30f2afac9b (svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers 2010-08-26 22:01:16 +00:00
rubidium e2e26190d5 (svn r20623) -Codechange: unify the storing of animation related information 2010-08-26 15:31:40 +00:00
rubidium 79027229b9 (svn r20582) -Fix [FS#4044]: Autoreplace can trigger an assertion when at the vehicle limit 2010-08-20 17:35:10 +00:00
rubidium cc658392eb (svn r20573) -Codechange: free/reserve some bits in the sell vehicle command to increase the vehicle pool limit 2010-08-19 20:45:29 +00:00
rubidium 646fbb628a (svn r20572) -Codechange: free/reserve some bits in the wagon move command to increase the vehicle pool limit 2010-08-19 20:42:00 +00:00
rubidium 926594b599 (svn r20547) -Change: the way order backups are performed. Now restoring an order doesn't require up to 765 commands. 2010-08-18 20:48:38 +00:00
rubidium c5a670037b (svn r20536) -Codechange: unify the refitting of vehicles 2010-08-18 00:47:31 +00:00
yexo eeca1846d6 (svn r20534) -Codechange: unify the naming of the 'vehicle must be stopped in depot' strings 2010-08-18 00:30:12 +00:00
rubidium 4780cc50b2 (svn r20532) -Codechange: unify selling of vehicles a bit 2010-08-17 23:55:22 +00:00
rubidium c14853b72e (svn r20531) -Codechange: unify quite a bit of the vehicle building commands 2010-08-17 23:15:55 +00:00
frosch 236737b2f2 (svn r20505) -Feature [FS#3978]: Allow changing visual effect when changing railtype. 2010-08-15 19:59:48 +00:00
frosch 57a098bccc (svn r20504) -Codechange: Move updating of train's visual effect to separate function. 2010-08-15 19:53:53 +00:00
alberth 35fec79700 (svn r20499) -Doc: Spelling fixes, and one doxygen comment addition. 2010-08-15 14:06:43 +00:00
rubidium 29b489a055 (svn r20437) -Codechange: lets Engines use GRFFilePropsBase as well 2010-08-10 15:54:53 +00:00
yexo a3a24f4c68 (svn r20376) -Feature [FS#3093]: add setting for none/original/more smoke (SirkoZ) 2010-08-05 12:09:08 +00:00
frosch 4bd32799f1 (svn r20286) -Codechange: Unify end of doxygen comments. 2010-08-01 19:44:49 +00:00
frosch ed4f806f1d (svn r20283) -Codechange: Unify start of doygen comments. 2010-08-01 19:22:34 +00:00
alberth a825b4fa5f (svn r20266) -Doc: Mostly typo fixes, a few doxygen-related improvements. 2010-07-31 21:02:56 +00:00
terkhen 88ca183191 (svn r20239) -Doc: Give a common name to all fall throughs (FALL THROUGH). 2010-07-29 14:26:28 +00:00
alberth be6c058424 (svn r20211) -Codechange: Indented code should have curly braces around it. 2010-07-24 10:14:39 +00:00
michi_cc 811f0db597 (svn r20098) -Fix [FS#3898]: A train reversing in a station would sometimes fail to release its reserved path. 2010-07-09 14:14:17 +00:00
frosch a7d168b2e5 (svn r20079) -Codechange [FS#3922]: Add helper functions to deal with the 192-256-magic of vehicle movement. 2010-07-04 13:07:47 +00:00
frosch be5e880f0b (svn r20006) -Fix: Trains should also have running cost while slowing down for stop. 2010-06-21 17:36:46 +00:00
frosch e931399b31 (svn r20005) -Codechange: Enumify force_proceed. 2010-06-21 17:35:27 +00:00
frosch 94efc4c3b9 (svn r19992) -Fix [FS#3878]: Clear force_proceed when entering depots and when loading.
-Fix (r18515): Resetting of force_proceed on manual stopping did not work.
2010-06-16 20:27:59 +00:00
terkhen 54403a8251 (svn r19961) -Codechange: Unify "vehicle is destroyed" errors. 2010-06-11 20:20:45 +00:00
rubidium 4092471a98 (svn r19892) -Fix [FS#3856] (r19792): crash when trying to reserve 'in depot' track on clearing a crashed train 2010-05-23 22:14:22 +00:00
rubidium 99ecfe4061 (svn r19792) -Change: use the typed FOR_EACH_SET_BIT for Tracks (adf88) 2010-05-11 21:02:26 +00:00
rubidium e594042fb7 (svn r19785) -Codechange: reorder/rework the checks for CheckNextTrainTile a bit, causing the whole function to be a few percent faster and hopefully better to understand 2010-05-11 14:16:16 +00:00
rubidium 38d60f4b47 (svn r19784) -Fix [FS#3770]: if a waypoint is immediately followed by a path signal a reservation would be made from that path signal before the waypoint is marked passed. As a result the order to go to the waypoint is used to reserve the path after the waypoint and as such trains get lost 2010-05-11 11:55:12 +00:00
smatz 00a52cc475 (svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance 2010-05-03 23:36:17 +00:00
terkhen d9dc4c04f4 (svn r19699) -Codechange: Use InvalidateData at the refit window. 2010-04-23 17:29:53 +00:00
rubidium bc81039cb8 (svn r19687) -Fix: desync when joining the game because of using the wrong variable 2010-04-21 12:36:00 +00:00
frosch 1f28e232c3 (svn r19621) -Codechange: Remove direct usage of magic 'p1's in build vehicle commands. 2010-04-13 19:10:08 +00:00
smatz 0ef33548c2 (svn r19614) -Codechange: "it's" => "its" where appropriate 2010-04-12 14:12:47 +00:00
alberth 05d705e077 (svn r19494) -Codechange: Remove _error_message. 2010-03-20 17:58:24 +00:00
alberth 7cc68f493d (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 2010-03-13 17:11:28 +00:00
frosch dc79bf4c01 (svn r19356) -Fix: Whitespace. 2010-03-06 16:15:50 +00:00
terkhen a5f9a7c1a5 (svn r19342) -Codechange: Move inclination update functions to GroundVehicle. 2010-03-06 12:52:44 +00:00
terkhen 4e6cac84d6 (svn r19341) -Codechange: Move GOINGUP/GOINGDOWN flags to GroundVehicle.
-Codechange: Move GetSlopeResistance to GroundVehicle.
2010-03-06 12:50:55 +00:00
terkhen 07c373d60a (svn r19339) -Codechange: Move acceleration functions to GroundVehicle. 2010-03-06 12:44:30 +00:00
terkhen e4a5a556b4 (svn r19338) -Codechange: Move the acceleration cache to GroundVehicle. 2010-03-06 12:42:53 +00:00
terkhen b5714c3597 (svn r19336) -Codechange: Move rail speed limit to its own function. 2010-03-06 12:27:23 +00:00
alberth 63dd6ce6b0 (svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status. 2010-02-28 18:15:19 +00:00
michi_cc eae120361d (svn r19286) -Fix (r18648): [YAPP] If reversing at path signals was disabled, a train would not reverse when hitting the back of an one-way signal. 2010-02-28 08:18:20 +00:00
smatz 7b1e0a4b67 (svn r19260) -Codechange: another minor coding style fix 2010-02-25 22:59:24 +00:00
smatz ebab6120e6 (svn r19257) -Codechange: minor coding style fix 2010-02-25 21:13:50 +00:00
smatz f051066bc4 (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit 2010-02-24 14:46:15 +00:00
rubidium 32cdc157ee (svn r19091) -Cleanup: remove some unneeded zeroing 2010-02-10 21:28:26 +00:00
peter1138 2b820780a1 (svn r18972) -Add: [NewGRF] Per-rail type speed limits. 2010-01-31 13:17:29 +00:00
peter1138 2331ccd589 (svn r18971) -Fix: Train acceleration for original acceleration model wasn't updated if the train's power changed. 2010-01-31 12:56:32 +00:00
terkhen 272f2cd93e (svn r18963) -Codechange: Give AccelerationModel a generical name. 2010-01-30 16:27:35 +00:00
yexo b689e3d6e4 (svn r18941) -Fix [FS#3575]: remove the loading indicators as soon as a train crashes 2010-01-28 22:06:13 +00:00
terkhen d4376779f8 (svn r18939) -Codechange [FS#3545]: Move train slope steepness to its own function. 2010-01-28 20:54:29 +00:00
rubidium f94c83a387 (svn r18872) -Codechange: introduce PaletteID and use it 2010-01-21 01:38:13 +00:00
rubidium 4d93b704d9 (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 2010-01-18 22:57:21 +00:00
rubidium 23a8d2239f (svn r18854) -Codechange [FS#3539]: unconflict acceleration type as 'status' and rail property (Terhken) 2010-01-17 23:03:43 +00:00
rubidium 736c12f6ae (svn r18848) -Fix (r18838): the original accelaration got broken 2010-01-17 16:52:35 +00:00
frosch 707cf045f8 (svn r18841) -Fix (r16869): Default-waypoint was drawn incorrectly for monorail and maglev in the waypoint picker. 2010-01-17 00:51:18 +00:00
rubidium 719fb9803c (svn r18838) -Codechange [FS#3524]: reorganisation of the train acceleration code plus some minor optimisations (Terkhen) 2010-01-16 22:30:04 +00:00
rubidium 199091600a (svn r18836) -Codechange: make TrainUpdateSpeed a class function and update some comments (Terkhen) 2010-01-16 22:16:28 +00:00
rubidium aaf0b4b46c (svn r18812) -Codechange: make some functions in train.h functions of Train. 2010-01-15 18:23:52 +00:00
rubidium 82fc28f77f (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 2010-01-15 16:41:15 +00:00
michi_cc de878fad31 (svn r18778) -Fix [FS#3483]: [YAPP] Remove a special check for two-sided signals when reserving a path as this causes trains to get stuck in front of them. 2010-01-11 00:02:14 +00:00
peter1138 1382964fa0 (svn r18766) -Codechange: Make train acceleration type (rail/elrail/monorail vs maglev) a rail type property 2010-01-09 15:33:41 +00:00
rubidium e4af35d316 (svn r18764) -Fix [FS#3422]: split the (un)load ticks counter and signal wait counter; sometimes they might get into eachother's way 2010-01-09 14:43:08 +00:00
peter1138 739aea3e1a (svn r18674) -Feature (FS#3459): Configurable slope steepness for trains from 0% to 10%, default is 3% as before (mostly by Terkhen) 2009-12-31 10:41:03 +00:00
rubidium 4697a1f431 (svn r18653) -Fix [FS#3442]: when trying to attach a wagon to an existing free wagon chain, don't attach it to itself 2009-12-28 18:26:39 +00:00
michi_cc f7025612e1 (svn r18647) -Fix: [YAPP] A train inside a station was not always found when checking for trains on a reserved path. 2009-12-27 14:37:50 +00:00
rubidium c8db92e3dd (svn r18628) -Fix [FS#3422]: (un)loading counter being reset while loading a train and changing the (path) signal setup around the station 2009-12-25 18:01:27 +00:00
rubidium f2785ae24d (svn r18574) -Fix [FS#3392] (r18481): manually sending trains and RVs to depots didn't quite work 2009-12-20 16:19:47 +00:00
rubidium fbfcbe06ec (svn r18515) -Change: make it visible when you're to pass the next signal on danger and possible to cancel it
-Fix [FS#2891]: when you pass a signal at danger, in a PBS controlled area, don't try to do the 'safe' thing and stop, but continue going; the user wanted the train to pass the signal at danger so (s)he has to suffer the consequences. Ofcourse one can always stop the train manually.
2009-12-16 16:23:44 +00:00
rubidium c2ec2e2db3 (svn r18494) -Fix (r18474): crash when moving non-engine to new free wagon chain and group count was off when moving a front engine within the same train and the new front isn't an engine. 2009-12-13 22:17:12 +00:00
rubidium 52cbaf2db2 (svn r18484) -Codechange: simplify the Is(Stopped)InDepot functions for trains 2009-12-13 17:13:20 +00:00
rubidium 472e5501fa (svn r18481) -Codechange: unify the curve pathfinder penalty defaults; 0.01 tile won't make a dent, 3 tiles might be a bit too much
-Feature-ish: make maximum pathfinder penalties for finding depots customisable, also increase it slightly to 20 tiles worth of penalties.
2009-12-13 10:48:44 +00:00
rubidium 5477aec8fb (svn r18474) -Fix (r18470): in some odd corner cases the group (vehicle) counts could be off 2009-12-12 23:49:30 +00:00
rubidium d3e754fa6f (svn r18473) -Fix (r18470): crash when moving a multiheaded part to be just after itself 2009-12-12 23:24:11 +00:00
rubidium f4e7eba2e2 (svn r18472) -Fix [FS#3146]: selling vehicles in the depot could create states that are not allowed by the NewGRF attach callback. 2009-12-12 22:59:48 +00:00
rubidium 9be2c8c6bd (svn r18470) -Codechange/Fix [part of FS#3146]: moving vehicles around in the depot could create states that are not allowed by the NewGRF attach callback. 2009-12-12 22:11:43 +00:00
rubidium 9ae2422956 (svn r18466) -Codechange: use CmdMoveRailWagon to attach a just build wagon to a chain 2009-12-11 22:23:48 +00:00
rubidium b094312631 (svn r18465) -Codechange: simplify CheckTrainInDepot and remove some unneeded wrapper functions 2009-12-11 22:04:57 +00:00
rubidium 53d6d4a094 (svn r18463) -Codechange: some simplifications for finding the end of a vehicle 2009-12-11 19:28:28 +00:00
rubidium b8a7efc450 (svn r18462) -Fix: when moving a wagon and only the last part of a dual headed engine you could split the dual headed engine over two vehicles. 2009-12-11 19:27:48 +00:00
rubidium db4e547e24 (svn r18461) -Fix (r18456): when moving a wagon from the front of a train one could make a train 1 longer than allowed 2009-12-11 18:49:03 +00:00
rubidium dbe667fbe3 (svn r18459) -Codechange: move the new train validity checking (attach callbacks) to a separate function 2009-12-11 16:16:36 +00:00
rubidium fddedbe7ac (svn r18458) -Codechange: make the 'check train length' code of CmdMoveRailVehicle a separate function 2009-12-11 15:50:07 +00:00
rubidium c803540a9c (svn r18456) -Codechange: make the length checking functionality of CmdMoveRailVehicle a separate function and simplify the logic 2009-12-11 13:37:01 +00:00
rubidium ad6d8c1f46 (svn r18420) -Codechange: split YAPF's track follower from the actual YAPF code 2009-12-07 08:41:18 +00:00
rubidium 19fa38601d (svn r18402) -Codechange: unify/centralise the code for crashing vehicles 2009-12-04 20:29:46 +00:00
rubidium 9165c195b9 (svn r18371) -Codechange: unify calling of the train pathfinders 2009-12-02 09:57:17 +00:00
rubidium f52e27c688 (svn r18364) -Codechange: move the pathfinders and their related files into a separate directory 2009-12-01 22:45:39 +00:00
rubidium 3a83eab967 (svn r18362) -Cleanup: remove OPF for RVs and NTP to clean up lots of code and simplify some things for the future 2009-12-01 22:18:51 +00:00
frosch d634f31c7b (svn r18361) -Fix: Remove unneeded usage of invalid pointer. Also thank Hirundo and SmatZ. 2009-12-01 21:45:50 +00:00
frosch 2784f15304 (svn r18341) -Fix: Replace some GetNextVehicle() with GetNextUnit() where needed. 2009-11-29 18:46:54 +00:00
frosch d507136e04 (svn r18268) -Feature: [NewGRF] Make price base multipliers related to vehicles only apply to the GRF locally, if it defines engines of that type itself. 2009-11-24 13:15:58 +00:00
frosch 912bce0b8c (svn r18266) -Codechange: Add a function to compute prices from price base and cost factor and use it consistently for vehicle purchase, running cost, and refit cost. 2009-11-24 13:12:34 +00:00
rubidium bae066ecaf (svn r18123) -Codechange: try our best to keep the vehicles within the build vehicle list/autoreplace lists instead of overflowing. 2009-11-16 17:58:46 +00:00
rubidium 1c5a92ae98 (svn r18121) -Codechange: pass the maximum left/right location to the Draw*Engine functions 2009-11-16 17:15:42 +00:00
frosch 6ca8f6e380 (svn r18011) -Feature(ette): [NewGRF] CB 36 for roadvehicle property 09 'running cost factor'. 2009-11-08 13:02:05 +00:00
frosch e781929d7f (svn r18007) -Codechange: No need to call CB 36 'running cost factor' if the vehicle has no running cost class anyway. 2009-11-08 12:18:59 +00:00
alberth 44aacfc59f (svn r17928) -Codechange: ShowErrorMessage() now takes the summary string before the details string.
Gentlemen, swap your string parameters.
2009-10-31 19:46:51 +00:00
frosch 00aca63b48 (svn r17899) -Codechange: Deduplicate code for refitting vehicles. 2009-10-28 21:09:37 +00:00
frosch 83894809d0 (svn r17897) -Fix [FS#3255]: CB15 and CB36 (capacity) were not always called when they should.
-Codechange: Move capacity calculation to a single function for all vehicle types, so the behaviour can be kept consistent easier.
2009-10-28 18:31:16 +00:00
frosch 334b809644 (svn r17894) -Fix: Invalidate cache of vehicle vars 40-43 after testruns of certain commands, that change them temporarily. 2009-10-27 20:37:55 +00:00
frosch 9b80bc1f9b (svn r17858) -Codechange: Unindent some code. 2009-10-24 19:16:18 +00:00
frosch 7a8a97e68a (svn r17726) -Cleanup: Remove some unneeded/unused parameters. 2009-10-06 19:30:31 +00:00
frosch f3aacb8fe3 (svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present. 2009-10-06 19:17:07 +00:00
rubidium d6cded5380 (svn r17693) -Cleanup: remove some unneeded includes 2009-10-04 17:16:41 +00:00
frosch 12a814f487 (svn r17684) -Fix: tcache.first_engine and rcache.first_engine need to be set before first callback/sprite-resolving. For RV fronts it was missing at all, causing livery selection to fail. 2009-10-03 14:46:48 +00:00
frosch e261d8d9a0 (svn r17616) -Codechange [FS#3222]: Enumerize properties used in callback 0x36. Based on Terkhen's work. 2009-09-22 19:28:57 +00:00
frosch 7fa4d576ca (svn r17594) -Fix: Vehicle image was not always updated when needed. 2009-09-20 19:36:27 +00:00
rubidium 4ee9de96fd (svn r17576) -Fix [FS#3208]: assertion triggered when the second vehicle in a 101+ (or 11+ if mammoth trains is disabled) vehicle free wagon chain is an engine and the first vehicle is moved to another chain 2009-09-19 13:55:37 +00:00
rubidium 04d5b67eb6 (svn r17567) -Fix: some doxygen warnings 2009-09-18 14:23:58 +00:00
rubidium af457fc9fe (svn r17552) -Codechange: rename load_unload_time_rem to something more generic as it's used for more than just load/unload. Also add some documentation about where it is used. 2009-09-15 20:58:44 +00:00
rubidium 64bafcbe18 (svn r17534) -Codechange: unify the naming of callback masks/flags 2009-09-14 12:22:57 +00:00
frosch ebd916be3d (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 2009-09-13 19:15:59 +00:00
rubidium 860a538adc (svn r17495) -Codechange: replace 'Depot::Get(GetDepotIndex(tile))->index' with GetDepotIndex(tile) 2009-09-10 14:37:55 +00:00
rubidium 2a9574ead2 (svn r17352) -Fix [FS#3162]: trains wouldn't show smoke if the load/unload counter wasn't 0, though there doesn't seem to be a reason to check that variable anyhow anymore 2009-09-01 18:35:24 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
smatz c5533ae470 (svn r17168) -Codechange: apply coding style to if and while statements 2009-08-14 17:11:59 +00:00
michi_cc b84e93487f (svn r17152) -Fix: A stuck train could free the reservation of another train if it was reversed or did crash. 2009-08-10 23:52:44 +00:00
michi_cc da18471d48 (svn r17151) -Fix [FS#3104] (r13974): A train entering a PBS section through a block signal could cause a train crash if another reservation ending at a safe tile was already present in the section. 2009-08-10 23:52:40 +00:00
frosch efcaefd178 (svn r17121) -Fix [FS#3060]: Update vehicle position cache when the vehicle sprite changes. 2009-08-08 18:45:12 +00:00
smatz adcc5338f3 (svn r17085) -Codechange: unify the place where vehicle's cargo ages 2009-08-06 12:44:10 +00:00
smatz 9c25f1bdb7 (svn r17084) -Codechange: _age_cargo_skip_counter is common to all vehicle types 2009-08-06 12:33:13 +00:00
rubidium 1fe3ad3288 (svn r17075) -Codechange: rename ~750 strings to be more uniform with their relatives 2009-08-05 17:59:21 +00:00
rubidium 4b2592dbc0 (svn r17062) -Change: unify the naming of some 125 strings 2009-08-04 18:04:33 +00:00
rubidium 7440ec7a73 (svn r16947) -Codechange: use TileArea instead of train_tile, trainst_w and trainst_h. 2009-07-25 08:54:19 +00:00
rubidium cf38a5bee6 (svn r16939) -Codechange: s/RailwayStation/RailStation/ to unify the way it's written. 2009-07-24 11:47:12 +00:00
rubidium 68ead6b84f (svn r16909) -Fix [FS#2996]: NewGRF stations would be triggering assertions all over the place when using the more advanced station types.
-Change: make (rail) waypoints sub classes of 'base stations', make buoys waypoints and unify code between them where possible.
2009-07-22 08:59:57 +00:00
rubidium 2646a99d29 (svn r16908) -Codechange: s/DepotWaypointReservation/DepotReservation/ 2009-07-22 08:52:41 +00:00
rubidium 8405d7d7e7 (svn r16907) -Codechange: make a more clear distinction between reservation functions that return a bool and that return TrackBits; GetRailStationReservation vs GetRailwayStationReservation, which one returns the bool and which one the TrackBits? 2009-07-21 22:37:10 +00:00
rubidium f7b3067fb3 (svn r16901) -Fix [FS#3046] (rpbs): when marking trains stuck don't reset the unload counter/stuck when the vehicle is unloading. It'll be automatically reset once the vehicle wants to leave the station 2009-07-21 17:14:05 +00:00
frosch d5a4c89365 (svn r16894) -Codechange: Add [Specialised]Vehicle::Last(). 2009-07-20 19:58:33 +00:00
frosch 7b92d9efe4 (svn r16884) -Codechange: Add Train::GetFirstEnginePart() and use it. 2009-07-19 19:17:41 +00:00
frosch f129634f52 (svn r16867) -Feature(ette): Turn variable 0E/8E (vertical offset for trains in depot) and variable 1E/9E bit 3 (wagon width in depot) into grf-local variables. 2009-07-17 22:00:13 +00:00
smatz 57d3d4ce5e (svn r16857) -Fix [FS#3036](r16652): crash when train partially in depot crashed 2009-07-17 13:54:06 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
rubidium 741a340b8b (svn r16772) -Fix [FS#3019]: don't use the same error message for turning around road vehicles and flipping parts of trains in the depot 2009-07-08 22:11:55 +00:00
smatz 6a0855f0d1 (svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train 2009-07-02 12:10:39 +00:00
smatz 77eaefb61c (svn r16720) -Codechange: make Set/ClearFrontEngine(), Set/ClearArticulatedPart(), Set/ClearWagon(), Set/ClearEngine(), Set/ClearFreeWagon() and Set/ClearMultiheaded() members of Train 2009-07-02 00:17:27 +00:00
smatz d86e17d65a (svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train 2009-07-01 23:57:20 +00:00
smatz ecfaa0564d (svn r16718) -Codechange: make IsFreeWagon() member of Train 2009-07-01 23:49:13 +00:00
smatz adc5363202 (svn r16717) -Codechange: make IsFrontEngine() member of Train 2009-07-01 22:22:01 +00:00
smatz 38477f2b36 (svn r16655) -Codechange: use IsRailwayStationTile() more 2009-06-25 15:54:06 +00:00
smatz 029fb9bdee (svn r16652) -Codechange: use less strict, but faster check for quickly bailing out in FindTrainCollideEnum() (Bilbo)
-Codechange: shuffle the code a bit
2009-06-24 23:59:20 +00:00
smatz 05c695a647 (svn r16646) -Codechange: rename GetDepotByTile() to Depot::GetByTile() 2009-06-24 19:26:41 +00:00
smatz 986cc75a12 (svn r16641) -Codechange: reduce number of multiplications done in FindTrainCollideEnum() to minimum 2009-06-23 23:31:43 +00:00
smatz 192b9bda7b (svn r16633) -Codechange: remove checks for consistency of newpool 2009-06-23 10:44:46 +00:00
rubidium 512b021e26 (svn r16581) -Codechange: unify the access to Engine::lifelength. 2009-06-16 13:52:18 +00:00
rubidium 4b05617c42 (svn r16580) -Codechange: rename Engine::image_index to original_image_index to not confuse it with image_index from *VehInfo. 2009-06-16 13:31:06 +00:00
smatz 62f120b296 (svn r16571) -Fix [FS#2974](r16322): in some cases, train could be stuck in depot 2009-06-13 10:22:22 +00:00
smatz 5a6bb53894 (svn r16553) -Codechange: don't use TRACK_BIT_WORMHOLE and TRACK_BIT_DEPOT as bitmasks 2009-06-10 16:02:00 +00:00
smatz 1c5ca9822d (svn r16545) -Cleanup: tunnels have been returning correct SlopeZ since r1 2009-06-09 20:04:46 +00:00
smatz 0c10006907 (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 2009-06-06 16:54:22 +00:00
frosch 0d782b0f96 (svn r16498) -Codechange: Remove hardly used HASBITS. 2009-06-01 15:01:54 +00:00
smatz de25de7a60 (svn r16494) -Codechange: cache train's speed limit caused by curves 2009-06-01 13:14:56 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
frosch 9853c0dc22 (svn r16480) -Fix (r15617): Invalidate newgrf variable caches of more vehicles in more places. Esp. they were only invalidated for trains. 2009-05-31 12:03:14 +00:00
smatz 5a463c8347 (svn r16442) -Codechange: use new Vehicle accessors at more places 2009-05-26 22:45:48 +00:00
smatz 7ee882d03f (svn r16441) -Codechange: new class SpecializedVehicle used as superclass for all vehicle types 2009-05-26 22:10:13 +00:00
yexo 0d56cfabfa (svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them. 2009-05-26 21:59:49 +00:00
rubidium 984bd3b98d (svn r16427) -Codechange: replace a few magic numbers with an existing constant and unduplicate a few lines. 2009-05-26 08:53:16 +00:00
rubidium 0d99b6c71c (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 2009-05-24 20:29:04 +00:00
frosch a4557c7da4 (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 2009-05-24 16:52:42 +00:00
frosch 8109a74c95 (svn r16414) -Change: Make it harder to ignore/close important error messages. Esp. do not close them automatically after some time. 2009-05-24 12:50:58 +00:00
rubidium 86710c5185 (svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle 2009-05-23 12:27:42 +00:00
rubidium 6237fe1462 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 2009-05-23 09:10:56 +00:00
rubidium da5661a0c8 (svn r16393) -Codechange: move VehicleRail to Train. 2009-05-22 22:55:41 +00:00
rubidium c4b627af42 (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 2009-05-22 22:33:05 +00:00
rubidium 80e94b9bb1 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 2009-05-22 22:22:46 +00:00
rubidium 6d1c974254 (svn r16384) -Codechange: move u.effect to EffectVehicle 2009-05-22 18:56:25 +00:00
rubidium 441011b782 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 2009-05-22 18:17:20 +00:00
smatz 62a7948af0 (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 2009-05-22 15:13:50 +00:00
smatz b687ac51ee (svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted 2009-05-22 13:53:14 +00:00
smatz 8808f3beea (svn r16352) -Codechange: use PoolItem::GetIfValid() instead of PoolItem::IsValidID() and PoolItem::Get() 2009-05-18 16:21:28 +00:00
smatz 0af27062c4 (svn r16349) -Codechange: rename IsPlainRailTile() to IsPlainRail(), introduce shiny new IsPlainRailTile() 2009-05-18 01:26:23 +00:00
smatz 871107f529 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 2009-05-17 01:00:56 +00:00
smatz 6221d74644 (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 2009-05-16 23:34:14 +00:00
rubidium 8324cfc875 (svn r16322) -Fix [FS#2873]: trains could get stuck in a depot when they wanted to go to the same depot again. 2009-05-16 20:08:49 +00:00
frosch 32ecc48ec8 (svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark) 2009-05-13 21:45:56 +00:00
smatz a1addc1d95 (svn r16302) -Codechange: remove Vehicle::AllocateList 2009-05-13 21:38:23 +00:00
smatz c0ed9f779b (svn r16301) -Cleanup: remove unused parameter 2009-05-13 20:30:46 +00:00
frosch 677ea100b3 (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 2009-05-09 13:37:18 +00:00
rubidium 2664f2a2d9 (svn r16242) -Codechange: rework pausing
-Fix [FS#2864]: autopause and manual pausing conflict with eachother
-Fix: new game + pause on new game + autopause make the game not unpause on the first join
2009-05-06 15:06:57 +00:00
rubidium 59d45a04d6 (svn r16118) -Change/cleanup: remove the hexadecimal 'in TTD the string had this ID' from 'some' strings and replace the string name with something more sensible. 2009-04-21 23:40:56 +00:00
rubidium 2a2b40461d (svn r16087) -Fix (r16079): slow trains wouldn't crash into eachother anymore 2009-04-19 04:36:53 +00:00
rubidium 06a8a8ce8d (svn r16079) -Fix [FS#2824]: insanely fast trains would not stop in time for stations
-Fix: insanely fast trains would sometimes 'jump' over waypoints/via stations within a tick, which would cause the order not to be processed causing the train to go in loops until (with luck) it 'hit' the tile
2009-04-18 13:43:05 +00:00
frosch 3086a89ee3 (svn r16075) -Fix (r15792)[FS#2844]: Mixed up TRACK_BIT_X/Y. 2009-04-17 23:16:01 +00:00
rubidium 34cc30e7fb (svn r16057) -Fix [FS#2834] (r16037): division by zero when having an order with only one station that has either middle or near end stop location and where the platform is (significantly) longer than the train. 2009-04-13 22:27:21 +00:00
rubidium 5790293af6 (svn r16037) -Feature: allow (per order) to let a train stop at the near end, middle or far end of a platform from the point of view of the driver of the train that enters the station. 2009-04-12 14:11:14 +00:00
frosch ce513b46b7 (svn r15793) -Feature: Allow train vehicles to be shorten to 1/8 length, even if not at the end of the train. 2009-03-21 22:32:51 +00:00
frosch 88a95661a3 (svn r15792) -Codechange: Use a different algorithm for train vehicles to follow the vehicle in front of them. 2009-03-21 22:25:38 +00:00
frosch d452a0a0ec (svn r15789) -Codechange: Add DiagdirBetweenTiles() and use it. 2009-03-21 21:43:23 +00:00
rubidium b25a4f8231 (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 2009-03-15 00:32:18 +00:00
frosch 4129b418cc (svn r15701) -Fix [FS#2595]: Blame NewGRFs returning inconsistent information in purchase-list/after building before users have a chance to blame OpenTTD for incorrectly autorenewing/-replacing. 2009-03-13 21:28:40 +00:00
rubidium cf21547814 (svn r15677) -Fix [FS#2546]: vehicle images would be determined during the process of moving the vehicle which means that only the (orientation) data for the vehicles in front of it is valid. Now the data for the vehicles behind the vehicle are valid too. 2009-03-11 23:23:08 +00:00
rubidium 655b0ccc2e (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 2009-03-11 20:43:14 +00:00
rubidium c0d71b84f9 (svn r15617) -Change [FS#2694]: vehicle variables 40-43 weren't cached (though spec stated they are). Caching these variables can yield a 10+% speed increase when those vehicle variables are queried often. 2009-03-04 23:32:23 +00:00
frosch d3850e101c (svn r15541) -Revert (r15399): 'v->cargo_type' is also used in other places, which cannot accept CT_INVALID.
-Codechange: Add Engine::GetDefaultCargoType() and Engine::CanCarryCargo() and use them.
-Fix [FS#2617]: When articulated parts have no available default cargo, use the cargo type of the first part for livery selection.
-Change: To decide whether a vehicle is refittable do not test its current capacity for being zero, but always use the 'capacity property'.
  Note: The property is used unmodifed without calling CB 15/36. By setting it to a non-zero value and returning zero in the callback vehicles can be refitted to/from zero capacity for e.g. livery effects.
  Note: It is intentional that you cannot control refittability by CB 36.
2009-02-21 12:52:41 +00:00
smatz e1c43f4fac (svn r15497) -Fix (r15027): when trains crashed, AIEvent was created only for one train 2009-02-16 17:16:58 +00:00
smatz f65d70476b (svn r15496) -Codechange: one division less in the train acceleration code 2009-02-16 01:57:55 +00:00
smatz 3072a5d7c2 (svn r15439) -Fix [FS#2626]: call Vehicle::LeaveStation() before reversing overlength loading train (station triggers were missed, PBS reservation could cause crash) 2009-02-10 12:49:12 +00:00
rubidium d846eef0b6 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 2009-02-09 21:20:05 +00:00
rubidium c0a8d09ca7 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 2009-02-09 02:57:15 +00:00
frosch 7f198507f7 (svn r15358) -Add [NoAI]: AIEventVehicleCrashed::GetCrashReason() 2009-02-05 17:28:37 +00:00
peter1138 48e6e7d586 (svn r15320) -Codechange: Increase 'realistic' acceleration 'resolution' by one bit by reducing a division and removing a multiplication: 3/4*2 = 0; 3/2 = 1. And a smidgeon less CPU usage, hah. 2009-02-02 21:38:36 +00:00
michi_cc 44016a4d6e (svn r15313) -Cleanup: Use helper functions we already have and add some documentation. 2009-02-02 01:28:42 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
glx fc965a75dc (svn r15269) -Codechange: reduced indentation in CmdBuildRail* 2009-01-25 15:35:21 +00:00
frosch ca10c5c6e3 (svn r15268) -Fix: AIEventVehicleLost triggered at every pbs signal independent of the vehicle being lost. 2009-01-25 13:20:13 +00:00
glx c1cf3934fa (svn r15263) -Codechange: added Engine::GetCost() to remove some code duplication. 2009-01-25 00:57:03 +00:00
peter1138 3d404c2927 (svn r15236) -Codechange: Rename realistic_acceleration patch option to train_acceleration_model, and change from boolean to value. Don't forget to update your settings. 2009-01-23 20:53:43 +00:00
peter1138 c1622b04ab (svn r15208) -Codechange: Remove some kind (undocumented, so who really knows) of original attempt to limit maximum tractive effort from 'realistic' acceleration. 2009-01-22 14:34:29 +00:00
peter1138 92b9ff3f96 (svn r15205) -Revert (r7421, partial): Support for MaxTE solves problem in a better way 2009-01-22 09:57:31 +00:00