Commit Graph

752 Commits

Author SHA1 Message Date
frosch b642b4a881 (svn r22847) -Fix (r22816): Wagons shall not be processed by autorenew. 2011-08-27 08:41:36 +00:00
frosch 28117b3eb0 (svn r22816) -Feature(ette): [NewGRF] Also age wagons and articulated parts. 2011-08-22 21:33:58 +00:00
michi_cc 08b7981f37 (svn r22713) -Feature: [NewGRF] Per vehicle custom cargo ageing period. 2011-08-03 20:55:08 +00:00
michi_cc 050a212195 (svn r22572) -Fix: MSVC performance warning (assigning int to bool). 2011-06-12 23:42:42 +00:00
michi_cc c9af6126f8 (svn r22532) -Fix: Do not create an implicit order if the current order is the first order in the order list and we visit the station of the last entry of the order list. 2011-06-02 22:41:05 +00:00
frosch 460d24fd83 (svn r22506) -Feature [FS#4625]: Make the transparency options for industries also affect the effect vehicles created by industries. 2011-05-28 09:46:37 +00:00
frosch 87515d0873 (svn r22492) -Fix [FS#4624] (r21642, r22328): Only try to insert implicit orders for ground vehicles. Aircraft may reach unscheduled terminals when skippnig orders etc. 2011-05-25 20:10:02 +00:00
frosch 474b4799e8 (svn r22482) -Codechange: Add some contants for the number of ticks between certain cyclical tasks. 2011-05-21 11:26:37 +00:00
planetmaker 43c8cd1d5e (svn r22473) -Codechange: Automatic orders are better called implicit orders as no real order influencing path finding is added 2011-05-18 12:19:58 +00:00
frosch 204a6b16c3 (svn r22333) -Change: Prefer deleting automatic orders instead of inserting new ones. 2011-04-16 17:20:08 +00:00
frosch 74069dbda3 (svn r22332) -Fix: When inserting automatic orders, do not create consecutive duplicate orders. 2011-04-16 17:18:04 +00:00
frosch 8dd2f413bd (svn r22331) -Change: When inserting an (automatic) order A in front of an order B, disable modifications of automatic orders for all vehicles currently heading for B as we do not know whether they will reach A or B first. (except for the vehicle causing the insertion of the automatic order itself) 2011-04-16 17:06:59 +00:00
frosch 709f0e4f83 (svn r22329) -Change: When the current orders are interrupted for non-ordered service, disable modifications to automatic orders until the next real order is completed. (train part already slipped by in r22328) 2011-04-16 16:56:24 +00:00
frosch 194a941a37 (svn r22328) -Add: a flag to GroundVehicles to disable insertion and removal of automatic orders until the next real order is reached. 2011-04-16 16:45:35 +00:00
frosch aedd38255b (svn r22327) -Add: Vehicle::GetGroundVehicleFlags() for accessing GroundVehicle<>::gv_flags through a Vehicle struct. 2011-04-16 16:41:02 +00:00
frosch 5eafcd8de6 (svn r22324) -Fix: Vehicles skipped orders when inserting automatic orders failed. 2011-04-15 19:03:55 +00:00
frosch dd20823277 (svn r22245) -Codechange: Make vehicle lists handle command-/GUI-scope invalidations themself. 2011-03-13 21:33:30 +00:00
frosch 19b7249ade (svn r22135) -Fix [FS#4523]: When commands need to invalidate windows, process these events asynchronously before the next redraw. Calling window code directly from command scope uses wrong _current_company and might issue nested DoCommands() which interfer with the running command. 2011-02-23 20:54:55 +00:00
smatz 756cc6cf65 (svn r22116) -Codechange: use PoolBase::Clean() at more places 2011-02-19 23:05:47 +00:00
rubidium 68bc93f950 (svn r22111) -Codechange/fix-ish: upon cleaning a pool a destructor should not delete items from other pools 2011-02-19 18:02:17 +00:00
smatz 7af2470a78 (svn r22022) -Fix [FS#4468]: verify we can allocate an order before we actually try to do so 2011-02-08 18:21:55 +00:00
rubidium bc3ce1e53b (svn r22018) -Cleanup: remove some (now) unneeded includes of functions.h 2011-02-07 22:37:22 +00:00
rubidium 64cba95fbe (svn r22006) -Fix [FS#4480]: smoke/sparks of trains would be shown under bridges, or rather through bridges 2011-02-07 09:50:20 +00:00
rubidium 4c5ca17486 (svn r21957) -Cleanup: gotodepot and timetabling settings are more or less useless; just don't use depot orders or timetabling if you don't want to use it 2011-02-04 15:13:20 +00:00
frosch a97d52a29a (svn r21933) -Codechange: Split cur_order_index into cur_auto_order_index and cur_real_order_index to keep track of the current real order in an unambiguous way.
-Fix [FS#4440]: Automatic orders behave now stable wrt. service orders and are not added or removed depending on the need of servicing.
-Fix: Various other issues with automatic orders, e.g. vehicles getting stuck with "no orders" when there are automatic orders at the end of the order list.
2011-01-31 20:44:15 +00:00
rubidium 67a5cd0b18 (svn r21932) -Document: some tidbits related to vehicles 2011-01-31 20:27:33 +00:00
alberth eea2f90da7 (svn r21925) -Doc: Doxygen additions and markup corrections to vehicle-related functions. 2011-01-29 21:37:11 +00:00
terkhen 734994c9ba (svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
2011-01-29 17:30:25 +00:00
rubidium 8017c2a3d7 (svn r21909) -Fix: some missing spaces 2011-01-26 08:14:36 +00:00
frosch 9a1c0f139a (svn r21902) -Fix: Do not count articulated parts when passing the number of vehicles to refit to the command. That may exceed 8 bits. 2011-01-23 14:58:54 +00:00
rubidium 7eba2bf4d3 (svn r21890) -Cleanup: remove some unneeded includes 2011-01-22 14:52:20 +00:00
terkhen b5468e7a80 (svn r21860) -Codechange: Rename road vehicle subtype functions to match the train names. 2011-01-19 18:44:13 +00:00
terkhen cfbbcf1597 (svn r21858) -Codechange: Give more similar names to ArticulatedPart functions. 2011-01-19 18:41:53 +00:00
rubidium d89095b3ec (svn r21843) -Codechange: move documentation towards the code to make it more likely to be updates [t-z]. 2011-01-18 21:58:22 +00:00
rubidium 62128e8263 (svn r21826) -Fix [FS#4007]: the expectations from the "always build infrastructure" setting name/description didn't match the behaviour 2011-01-16 21:10:41 +00:00
rubidium bd9f07e5a0 (svn r21809) -Fix [FS#4404]: remove unreached automatic orders as well when reaching an ordered waypoint or depot (fonsinchen) 2011-01-15 18:19:04 +00:00
rubidium 4784c3ac3c (svn r21808) -Fix: don't create automatic orders when there are no manual orders (fonsinchen) 2011-01-15 18:16:46 +00:00
rubidium bc9afec3b0 (svn r21807) -Codechange: split automatic order removal into a separate function (fonsinchen) 2011-01-15 18:14:29 +00:00
smatz 0ab078158e (svn r21804) -Remove [FS#4409]: the 'stopall' console command, as its functionality was broken. Group start/stop commands can be used instead 2011-01-15 15:51:16 +00:00
smatz 2709454040 (svn r21802) -Cleanup (r2600): remove unused _vehicle_id_ctr_day 2011-01-15 14:20:34 +00:00
frosch be106c77a9 (svn r21738) -Fix (r21642)[FS#4384]: Start loading when cur_order_index points to the destination station, i.e. after deleting not-reached automatic orders. 2011-01-06 22:27:56 +00:00
rubidium 64c7cc51b5 (svn r21679) -Fix (r21642): reading a just freed variable 2010-12-31 15:53:46 +00:00
rubidium b06b05c360 (svn r21643) -Fix (r21642): crash when a train with no orders (or actually no order list) stops at a station 2010-12-26 12:55:12 +00:00
rubidium 64f04c3a74 (svn r21642) -Feature: concept of automatic station orders; add stub orders for intermediate stations and remove them when not visiting them anymore. This allows you to see what trains visit a station without actually having to order a vehicle to stop at all stations. Based on patch by fonsinchen 2010-12-26 09:03:19 +00:00
frosch c4ad5d6fea (svn r21598) -Fix (r3139, r21236, r21249)[FS#4275]: The default visual effect only depends on properties of the Engine (wagon or not, tractiontype, ...), not whether it is used as articulated part, front engine or whatever in a specific consist. 2010-12-22 15:40:22 +00:00
frosch 4b2624de1d (svn r21597) -Fix (r21239): Also catch the case when callback 10 returns VE_DEFAULT. 2010-12-22 14:51:12 +00:00
frosch fbe653d4ef (svn r21596) -Codechange: Rename a misleading-named variable. 2010-12-22 14:38:24 +00:00
terkhen 8fc48a79da (svn r21562) -Change: Add articulated parts of vehicles in a refit selection to that selection. 2010-12-21 13:53:19 +00:00
terkhen a1ff6859c5 (svn r21561) -Change: Allow to specify the number of vehicles to refit in the refit vehicle command. 2010-12-21 13:52:10 +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 a4a9274177 (svn r21519) -Codechange: Allow direct access to the GroundVehicleCache from a Vehicle. 2010-12-14 21:31:00 +00:00
terkhen 12c86a1391 (svn r21518) -Codechange: Rename AccelerationCache to GroundVehicleCache. 2010-12-14 21:28:45 +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 23369337c1 (svn r21466) -Codechange: make VehicleHasDepotOrders a function of Vehicle. 2010-12-11 13:48:30 +00:00
rubidium 40258d927f (svn r21249) -Fix (r21240, r21236) [FS#4242]: rear ends of dualheaded engines didn't smoke nor spark (Hirundo) 2010-11-18 23:09:24 +00:00
rubidium 2223ff92c7 (svn r21240) -Feature: [NewGRF] Implement action0 visual effect properties for ships and RVs (Hirundo) 2010-11-18 14:32:09 +00:00
rubidium 46186134c8 (svn r21239) -Codechange/Fix: [NewGRF] Use 0xFF instead of 0 as default value for visual effect. This makes setting train prop 22 to 0 actually work (Hirundo) 2010-11-18 14:20:03 +00:00
rubidium 9af570eab4 (svn r21237) -Codechange: Move HandleLocomotiveSmokeCloud to Vehicle::ShowVisualEffect (Hirundo) 2010-11-18 14:15:27 +00:00
rubidium b9407f7ca0 (svn r21235) -Codechange: Move Train::UpdateVisualEffect to the Vehicle class (Hirundo) 2010-11-18 14:09:39 +00:00
terkhen c96cb9ce37 (svn r21214) -Add: Display mail capacity when refitting an aircraft to passengers. 2010-11-16 20:56:04 +00:00
terkhen 25d1b2f54b (svn r21098) -Codechange: Ships now store their max speed in the cache instead of recalculating it every time. 2010-11-06 13:03:17 +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 8dc7521bf2 (svn r21039) -Fix/Cleanup: Remove an unneeded and even wrong test, which is never reached anyway though. 2010-10-25 20:43:36 +00:00
frosch 611e986226 (svn r20847) -Codechange: Split most of GetEngineLivery() into a separate GetEngineLiveryScheme() function. 2010-09-25 21:57:52 +00:00
rubidium f5128695c5 (svn r20772) -Codechange: use packed VehicleListIdentifiers as window numbers 2010-09-08 21:37:13 +00:00
smatz fd54943c7a (svn r20753) -Feature [FS#3999]: make it possible to select vehicle to clone and vehicle to clone orders from directly from vehicle lists and depot window 2010-09-06 14:14:09 +00:00
rubidium f1f1c71a41 (svn r20646) -Codechange: make the code flow of breakdown handling a bit clearer 2010-08-28 14:18:56 +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 9d1145e50c (svn r20605) -Fix [FS#4063]: let NewGRFs var43 var (information about liveries) for vehicles not be influenced by the local setting determining whether to show liveries or not. 2010-08-23 22:28:35 +00:00
rubidium d6cd62e633 (svn r20581) -Codechange: simplify getting the station in CalcPercentVehicleFilled 2010-08-20 15:35:14 +00:00
rubidium 287ee8c01d (svn r20541) -Fix: when removing a vehicle update the "clone orders of"-vehicle of a backed up order, or remove it if there is no vehicle sharing orders with that vehicle. 2010-08-18 15:58:30 +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
alberth 5cfc029523 (svn r20391) -Fix [FS#3993]: Prevent buying more vehicles than allowed. 2010-08-06 20:10:53 +00:00
alberth e0e66b6ed0 (svn r20390) -Codechange: Move company vehicle counting to vehicle.cpp. 2010-08-06 19:56:14 +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
yexo dd7800ea18 (svn r20234) -Fix [FS#3988]: refit costs from refit orders are subtracted from the vehicle yearly income 2010-07-28 14:18:58 +00:00
terkhen 8858729ae7 (svn r20142) -Fix [FS#3880]: Ships were not marked as dirty when stopping inside a depot. 2010-07-14 12:20:48 +00:00
frosch 1055c2b0fd (svn r20106) -Fix (r5999): Engine and vehicle age were clamped at 0xFFFF, though there are 32bit available. 2010-07-10 08:54:57 +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
alberth 604e56adc2 (svn r20025) -Doc: Fix/add comments to let Doxygen know about the documentation. 2010-06-27 09:05:10 +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 3287f91893 (svn r19963) -Add: Stop a vehicle after it crashes or is destroyed. 2010-06-11 20:30:12 +00:00
frosch 1d3adb2b66 (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 2010-06-05 12:16:12 +00:00
frosch 9db3cde73a (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 2010-05-31 20:22:57 +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
rubidium f56ebd81c3 (svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables 2010-04-24 13:39:11 +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
yexo c4a88ce022 (svn r19455) -Codechange: split all airport information in Station to a seperate class 2010-03-18 21:02:20 +00:00
alberth 7cc68f493d (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 2010-03-13 17:11:28 +00:00
alberth 55f8d5d802 (svn r19369) -Codechange: EnsureNoTrainOnTrackBits() returns a CommandCost now. 2010-03-07 18:24:41 +00:00
alberth 6eac50bc16 (svn r19366) -Codechange: Move setting of _error_message from the callback check routine to the caller. 2010-03-07 16:10:40 +00:00
alberth 29b79e03e8 (svn r19365) -Codechange: Move EnsureNoTrainOnTrackProc() to src/vehicle.cpp. 2010-03-07 15:54:58 +00:00
alberth c395b93acd (svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost. 2010-03-05 21:20:22 +00:00
yexo 404df87b1f (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 2010-02-28 20:28:08 +00:00
alberth 63dd6ce6b0 (svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status. 2010-02-28 18:15:19 +00:00
alberth 993d82b879 (svn r19289) -Codechange: Move _error_message assignment from check routine to caller. 2010-02-28 10:47:46 +00:00
alberth 8408b42dee (svn r19288) -Codechange: Move EnsureNoVehicleOnGround() and HasVehicleOnTunnelBridge() functions. 2010-02-28 10:44:53 +00:00
alberth d7698bb6db (svn r19282) -Doc: Add some doxygen doc markup. 2010-02-27 19:53:37 +00:00
smatz f051066bc4 (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit 2010-02-24 14:46:15 +00:00
frosch 63b01f2009 (svn r19218) -Feature: [NewGRF] Add CB36 support for aircraft properties 0F and 11. (Eddi) 2010-02-22 21:46:20 +00:00
smatz d155794605 (svn r18978) -Fix [FS#3584](r14753): possible invalid memory access when merging companies 2010-02-01 00:10:52 +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 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 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 fb9eba67d1 (svn r18642) -Fix [FS#3432]: when a company goes bankrupt and has vehicles on a drive through road stop that is not theirs, the 'filled' cache of the road stops would get corrupted 2009-12-27 09:05:00 +00:00
frosch 640442ae03 (svn r18571) -Fix (r18551): Vehicles not carrying any cargo (e.g. engines) were not considered for sending to depot for replacement. 2009-12-20 15:21:39 +00:00
frosch 4434422c11 (svn r18568) -Codechange: Bail out early. 2009-12-20 15:08:20 +00:00
frosch 7ea108224b (svn r18551) -Fix [FS#1762]: When autoreplace is the only allowed reason to send vehicles to depot, first check some minimal requirements (engine availability, refittability) and a heuristic for the needed money. 2009-12-19 21:54:34 +00:00
rubidium d48ad4b6e3 (svn r18549) -Fix: first do the time-since-last-service check and only then determine whether autoreplace needs to take place. This way they will not keep autoreplacing continuously on failure, but only after some timeout. 2009-12-19 21:19:45 +00:00
rubidium 5c2b6a8943 (svn r18536) -Fix [FS#3386]: MSVC warning. Patch by pavel1269 2009-12-19 15:31:23 +00:00
peter1138 5a8353fafc (svn r18479) -Fix (r6532): Direction is accounted for long before motion counter is updated 2009-12-13 08:46:08 +00:00
rubidium ae92fd2865 (svn r18468) -Codechange: make sure one never makes self-loops using Vehicle::SetNext 2009-12-12 21:04:08 +00:00
rubidium 19fa38601d (svn r18402) -Codechange: unify/centralise the code for crashing vehicles 2009-12-04 20:29:46 +00:00
rubidium 0ef0e13795 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 2009-12-02 18:18:56 +00:00
frosch 828729344d (svn r17974) -Fix (r17926)[FS#3300]: C != T 2009-11-05 16:56:53 +00:00
frosch 3a95e115fc (svn r17930) -Fix (r17926): Aircraft were not carrying mail anymore, when CB15 was in use. 2009-11-01 08:48:16 +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 67cae40ec1 (svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides. 2009-10-31 17:48:09 +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 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
rubidium e9624fe0cc (svn r17682) -Codechange: remove erroneous space before some commas 2009-10-02 15:13:15 +00:00
frosch 7fa4d576ca (svn r17594) -Fix: Vehicle image was not always updated when needed. 2009-09-20 19:36:27 +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 6b2ff71e2c (svn r17363) -Fix [FS#3163] (r16717): feed autoreplace the front of vehicles, otherwise it gets distracted and bails out 2009-09-01 21:54:59 +00:00
rubidium 7fbc33dae1 (svn r17248) -Fix: add GPL license notice where appropriate 2009-08-21 20:21:05 +00:00
frosch 8bd029015e (svn r17209) -Codechange: Move cargo_type from (Rail|Road|Ship)VehicleInfo to EngineInfo. 2009-08-17 18:33:48 +00:00
smatz 50d03a8751 (svn r17091) -Fix (r17089)(r17090): regression test was right 2009-08-06 17:35:20 +00:00
smatz 88a2d688da (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 2009-08-06 17:02:49 +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 4b2592dbc0 (svn r17062) -Change: unify the naming of some 125 strings 2009-08-04 18:04:33 +00:00
rubidium 2962d8f0fc (svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message 2009-07-22 20:17:07 +00:00
rubidium c17c31b5b6 (svn r16919) -Codechange: unify some more StringID w.r.t. their naming 2009-07-22 19:12:20 +00:00
rubidium 2646a99d29 (svn r16908) -Codechange: s/DepotWaypointReservation/DepotReservation/ 2009-07-22 08:52:41 +00:00
frosch d5a4c89365 (svn r16894) -Codechange: Add [Specialised]Vehicle::Last(). 2009-07-20 19:58:33 +00:00
smatz 1f29e38b83 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 2009-07-16 19:00:13 +00:00
smatz b6960e4e17 (svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft 2009-07-13 16:37:27 +00:00
smatz 868c21cbcc (svn r16813) -Codechange: make IsEngineCountable() member of Vehicle 2009-07-13 16:35:22 +00:00
rubidium be56fa3217 (svn r16801) -Fix [FS#3022]: cargo payments weren't destroyed when a vehicle was destructed. This only happened when you crashed a vehicle while it was unloading. 2009-07-13 09:15:11 +00:00
rubidium 61e735ba4c (svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle. 2009-07-02 08:59: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 adc5363202 (svn r16717) -Codechange: make IsFrontEngine() member of Train 2009-07-01 22:22:01 +00:00
rubidium 985608c713 (svn r16694) -Fix [FS#2995] (rgradual loading, rnewindustries): only pay for whatever has been actually unloaded and perform the payment when unloading has finished. This fixes, amongst others:
* cheating by starting to unload and after getting paid rushing to the depot to get sold (or unloading, loading and getting paid again for the remainder)
 * cargo being dropped onto a station at the moment a stockpiling industry doesn't accept it anymore
 * industries getting cargo that has not been unloaded yet and subsequently dumping it back on the station in one go
Note: you will now get paid after the unloading has finished, so you'll have to wait a bit longer for 'your' money.
2009-06-29 19:55:36 +00:00
smatz 8343340acb (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 2009-06-24 17:39:54 +00:00
smatz 249b6e6798 (svn r16544) -Codechange: use double-linked list for vehicle position caches in order to improve performance (~5% with many vehicles) 2009-06-09 17:20:06 +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 5b497d6b49 (svn r16525) -Codechange: Notify small ufos on deletion of road vehicles, so they can head for somewhere else instead of stumbling over a ghost. 2009-06-06 14:46:50 +00:00
alberth bab70a823d (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 2009-06-01 11:43:36 +00:00
rubidium 75a818a325 (svn r16477) -Fix [FS#2936] (r12650): loading indicator when 'unload' in and 'no loading' is off was pointing to the wrong direction. 2009-05-31 11:04: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 5cd998b7a4 (svn r16451) -Fix (r16449): crash when a spectator (or dedicated server) received news about new engine 2009-05-27 19:37:27 +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 e3c5bc8d2e (svn r16434) -Cleanup: remove some dead code; primarily stuff that can't be reached like break after returns or break after functions that never return (i.e. NOT_REACHED) 2009-05-26 15:46:24 +00:00
rubidium 168ae6f7e2 (svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts. 2009-05-24 21:09:00 +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 7a37220881 (svn r16390) -Codechange: move u.road to RoadVehicle. 2009-05-22 20:22:20 +00:00
rubidium d37b840cf3 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 2009-05-22 20:18:45 +00:00
rubidium c882248348 (svn r16388) -Codechange: move u.air to Aircraft 2009-05-22 20:07:26 +00:00
rubidium ada3067960 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 2009-05-22 20:03:26 +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 70aab8bf04 (svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too 2009-05-18 19:32:16 +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
yexo 31eff1d4c3 (svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct 2009-05-15 23:55:06 +00:00
smatz a1addc1d95 (svn r16302) -Codechange: remove Vehicle::AllocateList 2009-05-13 21:38:23 +00:00
smatz 2bc5189ad5 (svn r16299) -Fix (r16242): don't use DoCommandP when the function can be called from another command 2009-05-13 19:13:36 +00:00
rubidium aa0459309c (svn r16291) -Fix [FS#2893]: RVs were unable to find a depot when turning around (in some cases), causing 'nearest depot' orders to be occasionally lost. 2009-05-13 10:58:41 +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
frosch ff7f2bdb20 (svn r16240) -Fix: Make 'stop in depot'-orders only apply on the target depot, not those which are entered on the way to them. 2009-05-06 13:15:07 +00:00
frosch 9023c24acf (svn r16228) -Fix/Change (r16187): If we are heading for a different depot, do also not do the refitting-part of the depot-order.
-Fix (r16198): && != &, GetDepotOrderType != GetDepotActionType and - uhm - ODATFB_NEAREST_DEPOT is not set for current_order either.
2009-05-04 19:27:22 +00:00
frosch a22ff74ef2 (svn r16198) -Fix/Change (r16187): 'Go to nearest depot'-orders are fulfilled when reaching any depot, even though the train decided for a different depot on the last junction/order-skip. 2009-05-01 23:16:52 +00:00
rubidium 2a68294990 (svn r16187) -Fix [FS#2871]: do mark the "go to depot X" order fulfilled when reaching any depot, but only when reaching depot X. 2009-04-29 21:12:30 +00:00
smatz 8dc0632b78 (svn r16178) -Fix [FS#2866]: don't try to reserve path for trains crashed in station 2009-04-27 15:10:15 +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 2ec09d95a1 (svn r16114) -Cleanup: unify some more strings and remove some more unused strings 2009-04-21 20:20: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
rubidium 8a39da7618 (svn r16048) -Fix/Feature-ish [FS#2740]: don't warn that crashed vehicles are getting old; upgrading them is impossible (racetrack) 2009-04-12 19:28:05 +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
rubidium 9d018723b7 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 2009-03-14 18:16:29 +00:00
smatz 40745dc0d9 (svn r15704) -Cleanup: remove further includes from recently split files 2009-03-13 23:48:07 +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 070320f25b (svn r15699) -Codechange: split Cmd* from vehicle.cpp to vehicle_cmd.cpp. 2009-03-13 20:09:35 +00:00
rubidium 55ce735c2c (svn r15681) -Cleanup: remove unneeded forward declaration. 2009-03-12 11:04:41 +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 fb2ea6c9ed (svn r15672) -Codechange: (left,right,top,bottom)_coord -> coord.(left,right,top,bottom), i.e. use Rect. 2009-03-11 17:26:58 +00:00
michi_cc 81595bf256 (svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks. 2009-03-09 18:41:54 +00:00
smatz a92cd2b72e (svn r15624) -Fix (r15621): warning about comparing signed and unsigned integer types 2009-03-05 22:55:47 +00:00
peter1138 7dd6f218ef (svn r15622) -Codechange: Duplication. 2009-03-05 17:52:35 +00:00
peter1138 1bde2d97b5 (svn r15621) -Feature: When cloning a vehicle with a custom name, add and/or increment a number at the end of name and assign it to the new vehicle (for emma) 2009-03-05 17:37:56 +00:00
smatz 425fe86a3d (svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT 2009-02-24 21: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
frosch 336fda62be (svn r15517) -Fix [FS#2642](r6455): Wagonoverrides and articulated engine parts use the colour scheme of the engine, but not its recolour callback, nor its 2CC flag. Same applies to roadvehicles. 2009-02-18 20:40:24 +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
rubidium 7da743a0dc (svn r15336) -Fix: do not use _current_company in the GUI as there are no guarantees that _current_company is the same as _local_company. 2009-02-04 16:45:07 +00:00
smatz 9723630cea (svn r15318) -Fix [FS#2594](r10288): don't warn about non-primary engines getting old 2009-02-02 16:49:11 +00:00
smatz 0d3f5e6e74 (svn r15299) -Cleanup: remove many redundant includes 2009-01-31 20:16:06 +00:00
smatz e00cf92f47 (svn r15077) -Codechange: enumify DAYS_IN_YEAR and DAYS_IN_LEAP_YEAR
-Change: when computing daily running cost, divide by 365 (instead of 364). Since r12134, the rounding errors don't need this correction anymore
2009-01-13 22:58:03 +00:00
truebrain a3dd7506d3 (svn r15027) -Merge: tomatos and bananas left to be, here is NoAI for all to see.
NoAI is an API (a framework) to build your own AIs in. See:
   http://wiki.openttd.org/wiki/index.php/AI:Main_Page
 With many thanks to:
  - glx and Rubidium for their syncing, feedback and hard work
  - Yexo for his feedback, patches, and AIs which tested the system very deep
  - Morloth for his feedback and patches
  - TJIP for hosting a challenge which kept NoAI on track
  - All AI authors for testing our AI API, and all other people who helped in one way or another
-Remove: all old AIs and their cheats/hacks
2009-01-12 17:11:45 +00:00
rubidium 6c880d1c20 (svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow) 2009-01-11 14:09:09 +00:00
smatz 0cd41d1dc6 (svn r14958) -Codechange [FS#1923]: when checking for unique names, compare only with manually set names
There are situations that aren't solvable (because of different language files), so if the user really wants to have duplicated name, allow him to do so. It solves desyncs between server and clients using different languages. It behaves the same in SP and MP, so users won't see the different behaviour as a bug (and even checking in SP could be worked around by the user).
2009-01-10 15:54:07 +00:00
rubidium 3d6c09b38d (svn r14952) -Codechange: unify the "can vehicle go to station" tests 2009-01-10 09:51:14 +00:00
rubidium 11da45ee55 (svn r14949) -Cleanup: pointer coding style 2009-01-10 00:31:47 +00:00
rubidium cda853872a (svn r14944) -Cleanup: add spaces around some operators 2009-01-09 22:56:28 +00:00
rubidium f0b0691bfe (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 2009-01-09 14:59:02 +00:00
frosch b522f73ba8 (svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted. 2009-01-08 21:16:19 +00:00
smatz 67bf6a0998 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 2009-01-04 18:34:23 +00:00
smatz 9a09e5c4a0 (svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow) 2009-01-04 17:42:46 +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
rubidium 0d54db5f9f (svn r14803) -Codechange: move order list management into it's own class and remove the order count from the savegame as we can easily count that (PhilSophus) 2009-01-03 13:52:06 +00:00
rubidium b3f2f40db7 (svn r14785) -Fix [FS#2132]: vehicle list for station gets closed when station view is closed even when the vehicle list is stickied. Other vehicle lists are not deleted when their 'opening' window gets closed so do the same with the station view. 2009-01-02 20:59:04 +00:00
rubidium 87e5a8b52b (svn r14754) -Codechange: get rid of _cmd_text and just pass it as (optional) parameter. 2008-12-28 14:37:19 +00:00
smatz 53679122af (svn r14753) -Fix (r1): after buying a company, one could have more vehicles with the same UnitID 2008-12-26 23:53:07 +00:00
smatz f4d10ec033 (svn r14751) -Codechange: put VehicleEnterTile declaration where it should be and use correct return type 2008-12-26 22:44:13 +00:00
rubidium 3ebe66a5e4 (svn r14748) -Codechange: unduplicate window updating when deleting vehicles. 2008-12-26 21:08:51 +00:00
rubidium f18043ee21 (svn r14747) -Codechange: remove DeleteVehicleChain in favour of the vehicle destructor as that was already doing the same for a few vehicle types. 2008-12-26 20:45:02 +00:00
rubidium 1721222080 (svn r14745) -Codechange: move "depot_list" and "leave_depot_immediately" out of the vehicle struct (saving up to 16 bytes per vehicle) as it is only used to tell a calling function entered a depot (for autoreplace). 2008-12-26 18:26:11 +00:00
michi_cc 808d9255a8 (svn r14559) -Fix [FS#2387]: A train could be blocked inside a depot if it was reversed just after leaving the depot. 2008-11-02 19:32:24 +00:00
rubidium 42df5cbc03 (svn r14524) -Add: stop-in-depot as part of orders (PhilSophus) 2008-10-24 14:49:45 +00:00
rubidium d832626bb9 (svn r14491) -Documentation: updates/additions of doxygen docs (Alberth) 2008-10-19 15:39:12 +00:00
rubidium 272b2ef0e9 (svn r14464) -Codechange: replace (uint)-1 with UINT_MAX (PhilSophus) 2008-10-14 18:38:51 +00:00
smatz 1906aa2bbb (svn r14448) -Codechange [FS#2328]: rename a few variables (based on a patch by planetmaker) 2008-10-07 20:57:41 +00:00
rubidium b650a86e58 (svn r14422) -Codechange: also reflect the changes of r14421 in the filenames. 2008-09-30 20:51:04 +00:00
rubidium 3b798599b6 (svn r14421) -Codechange: rename all player variables/types to company *or* client so it is immediatelly clear which one you are working with. 2008-09-30 20:39:50 +00:00
frosch 67db5087cd (svn r14406) -Fix [FS#Eddi]: Autoreplace did not work for vehicles in free wagon chains. 2008-09-27 14:58:46 +00:00
smatz 6987e6015a (svn r14395) -Fix [FS#2285]: crashes and GUI desyncs when order is deleted/modified while the timetable window is open
-Fix: close any dropdown and child windows in the Order and Timetable windows when selected order is deselected, deleted, ...
2008-09-24 16:40:06 +00:00