Commit Graph

157 Commits

Author SHA1 Message Date
rubidium b9407f7ca0 (svn r21235) -Codechange: Move Train::UpdateVisualEffect to the Vehicle class (Hirundo) 2010-11-18 14:09:39 +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
michi_cc 2d801c64a1 (svn r21106) -Change: Tuned realistic acceleration to be a bit more realistic in order to make acceleration "slower", which highlights the differences between vehicle types more. 2010-11-07 13:35:07 +00:00
terkhen c8a56f17f8 (svn r21097) -Codechange: Unify cached max speed for all vehicle types. 2010-11-06 12:53:31 +00:00
terkhen 766bf140db (svn r21092) -Codechange: Merge max speed functions. 2010-11-06 12:40:38 +00:00
alberth 7e48d85104 (svn r21060) -Doc: Improved wording of comments (mostly by __ln__) 2010-10-30 17:51:07 +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
frosch 4ca2609362 (svn r20503) -Fix (r18838): Powered wagons should check the railtype of the tile they are on, not where the engine is on. 2010-08-15 18:35:57 +00:00
terkhen 7d0297f967 (svn r20302) -Add: Method for getting the air drag of a ground vehicle. 2010-08-02 14:52:51 +00:00
terkhen 1fd66d7cc4 (svn r20299) -Add: Make trains and road vehicles use a different area value to calculate air drag. 2010-08-02 14:49:23 +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 e931399b31 (svn r20005) -Codechange: Enumify force_proceed. 2010-06-21 17:35:27 +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 f428102092 (svn r19337) -Codechange: Create the GroundVehicle class. 2010-03-06 12:41:18 +00:00
terkhen b5714c3597 (svn r19336) -Codechange: Move rail speed limit to its own function. 2010-03-06 12:27:23 +00:00
rubidium 7a73a7490d (svn r19090) -Codechange: some comment coding style fixes 2010-02-10 21:06:05 +00:00
peter1138 2b820780a1 (svn r18972) -Add: [NewGRF] Per-rail type speed limits. 2010-01-31 13:17:29 +00:00
terkhen 72f4bd818c (svn r18960) -Codechange: Move acceleration-related values to a separated cache. 2010-01-30 10:41:15 +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 23a8d2239f (svn r18854) -Codechange [FS#3539]: unconflict acceleration type as 'status' and rail property (Terhken) 2010-01-17 23:03:43 +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
rubidium 2b97f38cd1 (svn r18781) -Codechange: pass the CommandCost to the callback instead of whether it succeeded or not.
-Fix: AIs did update their last cost incorrectly in network games if the cost of the DC_EXEC phase differed from the ~DC_EXEC phase.
2010-01-11 18:46:09 +00:00
rubidium 833c6f36f3 (svn r18779) -Codechange: merge the command callbacks of the primary vehicles; they are identical 2010-01-11 18:34:02 +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
rubidium 52cbaf2db2 (svn r18484) -Codechange: simplify the Is(Stopped)InDepot functions for trains 2009-12-13 17:13:20 +00:00
rubidium b094312631 (svn r18465) -Codechange: simplify CheckTrainInDepot and remove some unneeded wrapper functions 2009-12-11 22:04:57 +00:00
rubidium 19fa38601d (svn r18402) -Codechange: unify/centralise the code for crashing vehicles 2009-12-04 20:29:46 +00:00
smatz c344ae2e1d (svn r17688) -Fix (r17684): incorrect comments 2009-10-04 04:57:01 +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
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +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 6a0855f0d1 (svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train 2009-07-02 12:10:39 +00:00
rubidium 4d14c1b534 (svn r16722) -Codechange: unify the naming of the Is/Set/HasArticulatedPart functions 2009-07-02 09:06:15 +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
rubidium 2fc0cb3e76 (svn r16505) -Fix [FS#2951] (r16472): since g++ 4.4 the implicit (default) constructor will zero the whole class. This caused all vehicle indices to be 0, which causes all kinds of trouble. 2009-06-02 19:12:28 +00:00
smatz de25de7a60 (svn r16494) -Codechange: cache train's speed limit caused by curves 2009-06-01 13:14:56 +00:00
smatz 8c11d612e4 (svn r16472) -Codechange: set vehicle type in SpecializedVehicle constructor instead of constructor of each vehicle type 2009-05-30 20:13:12 +00:00
smatz faae8f0177 (svn r16445) -Codechange: update old comments (Yexo) 2009-05-26 23:24:34 +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
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 441011b782 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 2009-05-22 18:17:20 +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
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 de9a6fc90b (svn r15308) -Codechange: Deduplicate km-ish/h -> mph conversions. 2009-02-01 17:14:39 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
smatz 7368c740a6 (svn r14828) -Codechange: move most of save/load-specific code to separate files 2009-01-04 15:32:25 +00:00
frosch 32e1fd55c5 (svn r14147) -Codechange: Allow passing 'const Vehicle *' to GetNextUnit() and GetPrevUnit(). 2008-08-23 22:31:36 +00:00
frosch f7826f8a37 (svn r14083) -Fix [FS#1264, FS#2037, FS#2038, FS#2110]: Rewrite the autoreplace kernel. 2008-08-16 14:02:20 +00:00
frosch 56459cab81 (svn r14082) -Codechange: Make 'GetNextUnit()' more fool-proof wrt. real dualheads. 2008-08-16 13:52:44 +00:00
rubidium bd0a420744 (svn r13955) -Codechange [YAPP]: Try to extend the path of a stuck train so it is able to continue. (michi_cc) 2008-08-02 22:54:38 +00:00
rubidium 10d8fb6456 (svn r13952) -Add [YAPP]: Trains now reserve paths trough PBS signals. Bump savegame version. (michi_cc) 2008-08-02 22:53:51 +00:00
smatz aae2aa64c4 (svn r13816) -Fix [FS#2150]: check for vehicle length changes outside a depot (callback 0x11) and give a warning about that 2008-07-24 15:19:26 +00:00
glx 1f0939f4e2 (svn r13782) -Cleanup: removed a useless declaration 2008-07-22 15:02:18 +00:00
rubidium 402a1e24ba (svn r12977) -Codechange: remove quite some redundant (duplicate) function declarations. 2008-05-06 22:17:12 +00:00
rubidium d03994098b (svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description. 2008-05-06 15:11:33 +00:00
smatz 9fc355fca5 (svn r12862) -Codechange: reduce code duplication for VehicleType -> WindowClass lookup 2008-04-24 09:55:20 +00:00
peter1138 5dcd689f56 (svn r12824) -Codechange: Standardise routines for drawing vehicle images, using correct types and less duplication. 2008-04-21 20:50:58 +00:00
rubidium 62bdc381e7 (svn r12657) -Codechange: add 'FindClosestDepot' to the vehicle class. 2008-04-11 08:14:43 +00:00
smatz ac389e16d2 (svn r12605) -Cleanup: variable scope and coding style in train* 2008-04-07 12:36:50 +00:00
rubidium bdd64495cd (svn r12575) -Codechange: unduplicate Process*Orders for trains, ships and road vehicles. 2008-04-05 10:55:50 +00:00
smatz 89e9bbfa98 (svn r12369) -Fix (r1681): reset train speed limits when _patches.realistic_acceleration changes 2008-03-15 19:24:13 +00:00
smatz 73a6525129 (svn r12194) -Codechange: apply coding style on enum TrainSubtype 2008-02-20 15:18:35 +00:00
glx 525409b0fc (svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class 2008-02-01 22:02:14 +00:00
rubidium 384503e7d3 (svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes. 2007-12-27 13:35:39 +00:00
skidd13 eeaa348f8b (svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style 2007-11-20 13:35:54 +00:00
skidd13 5c31a973a1 (svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style 2007-11-19 21:32:20 +00:00
skidd13 71c4325c50 (svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style 2007-11-19 21:02:30 +00:00
rubidium 40b871410b (svn r11068) -Codechange: remove Vehicle::HasFront as all vehicles have the Vehicle::first pointer correctly set. 2007-09-09 11:23:49 +00:00
rubidium 1d5d9de628 (svn r11053) -Fix: train status bar flickering a lot when waiting at a signal. 2007-09-07 21:09:37 +00:00
bjarni f7d1c125b1 (svn r11046) -Codechange: added function to get the next movable (non-articulated, non-read end of dualheaded engine) vehicle in a train 2007-09-05 10:33:42 +00:00
bjarni 7cdf6d1cbe (svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine 2007-09-05 10:15:23 +00:00
rubidium cb7eaff353 (svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that. 2007-08-30 13:03:56 +00:00
rubidium a407d53d1b (svn r11001) -Codechange: unify the way to determine whether a vehicle is in a depot. 2007-08-29 21:49:08 +00:00
rubidium 3f3b013b99 (svn r10999) -Codechange: unify the way the running cost of a vehicle is determined. Patch by nycom. 2007-08-29 21:27:16 +00:00
rubidium 2179faf5c8 (svn r10995) -Codechange: unify the way to get the displayed maxium speed of a vehicle. Patch by nycom. 2007-08-28 06:46:33 +00:00
rubidium 3c919e36a7 (svn r10985) -Codechange: unify/remove duplicate CcClone(Aircraft|RoadVeh|Ship|Train) in favour of CcCloneVehicle. 2007-08-26 21:21:59 +00:00
rubidium a5b32d8d72 (svn r10984) -Codechange: unify the way one can get the current speed in the same forwat so we can display it. 2007-08-26 20:43:22 +00:00
rubidium ab5fa3add2 (svn r10798) -Fix [FS#1105]: virtual functions do not work in destructors :(. 2007-08-05 17:43:04 +00:00
rubidium 90f85c957a (svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class. 2007-07-01 19:24:54 +00:00
rubidium 83a880c882 (svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image. 2007-07-01 19:11:47 +00:00
maedhros 4acf3e4c3f (svn r10009) -Codechange: Add and use Vehicle::IsPrimaryVehicle to replace individual checks depending on the vehicle type. 2007-06-01 12:03:10 +00:00
maedhros dce1101039 (svn r10007) -Codechange: Add some asserts to IsFrontEngine and friends to ensure that only trains use them. 2007-06-01 11:17:30 +00:00
rubidium 161786e222 (svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station. 2007-05-07 15:58:05 +00:00
rubidium 951c74806f (svn r9765) -Codechange: constify some class functions. 2007-05-02 09:39:11 +00:00
rubidium dce7dcb664 (svn r9764) -Codechange: replace some lookup tables by functions. 2007-05-02 09:29:41 +00:00
rubidium a4e045a3fb (svn r9760) -Codechange: remove the need for saving some vehicle variables. 2007-05-01 16:35:14 +00:00