Commit Graph

568 Commits (ebf19d62197f4335e6efc58714efb7610d586074)

Author SHA1 Message Date
michi_cc 454144474a (svn r20098) -Fix [FS#3898]: A train reversing in a station would sometimes fail to release its reserved path. 14 years ago
alberth 0dd71a0d7e (svn r20025) -Doc: Fix/add comments to let Doxygen know about the documentation. 14 years ago
frosch 6f800a8407 (svn r20005) -Codechange: Enumify force_proceed. 14 years ago
frosch 604971bdb2 (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.
14 years ago
terkhen 76287b117f (svn r19963) -Add: Stop a vehicle after it crashes or is destroyed. 14 years ago
frosch a5bea603ea (svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation. 14 years ago
frosch ee53807e51 (svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration. 14 years ago
smatz 27949d219d (svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance 14 years ago
rubidium cb92cdf975 (svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables 14 years ago
smatz 258b128a56 (svn r19614) -Codechange: "it's" => "its" where appropriate 14 years ago
alberth 72d62fd6fc (svn r19494) -Codechange: Remove _error_message. 14 years ago
yexo 22a27d3b62 (svn r19455) -Codechange: split all airport information in Station to a seperate class 14 years ago
alberth d5fe3f96c7 (svn r19405) -Codechange: CheckOwnership() returns a CommandCost. 15 years ago
alberth b04de719b3 (svn r19369) -Codechange: EnsureNoTrainOnTrackBits() returns a CommandCost now. 15 years ago
alberth a8385d5bf5 (svn r19366) -Codechange: Move setting of _error_message from the callback check routine to the caller. 15 years ago
alberth 014f651e65 (svn r19365) -Codechange: Move EnsureNoTrainOnTrackProc() to src/vehicle.cpp. 15 years ago
alberth 4c0d4990f5 (svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost. 15 years ago
yexo 23af928ce9 (svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info 15 years ago
alberth d0ec21fd3f (svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status. 15 years ago
alberth 6601623518 (svn r19289) -Codechange: Move _error_message assignment from check routine to caller. 15 years ago
alberth 16f52ec33a (svn r19288) -Codechange: Move EnsureNoVehicleOnGround() and HasVehicleOnTunnelBridge() functions. 15 years ago
alberth e6397cf68b (svn r19282) -Doc: Add some doxygen doc markup. 15 years ago
smatz 5504b1105e (svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit 15 years ago
frosch 89e7d3bd2b (svn r19218) -Feature: [NewGRF] Add CB36 support for aircraft properties 0F and 11. (Eddi) 15 years ago
smatz 50530a2529 (svn r18978) -Fix [FS#3584](r14753): possible invalid memory access when merging companies 15 years ago
rubidium 7127338414 (svn r18872) -Codechange: introduce PaletteID and use it 15 years ago
rubidium f618acfb7d (svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions 15 years ago
rubidium ea240269dc (svn r18812) -Codechange: make some functions in train.h functions of Train. 15 years ago
rubidium 9467b7c6d6 (svn r18809) -Codechange/Cleanup: remove unneeded headers from some files, if a header require a header make it include that header 15 years ago
rubidium ad8d6e8dd2 (svn r18764) -Fix [FS#3422]: split the (un)load ticks counter and signal wait counter; sometimes they might get into eachother's way 15 years ago
rubidium 1c9fc3f3eb (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 15 years ago
frosch 1e9c78b9c4 (svn r18571) -Fix (r18551): Vehicles not carrying any cargo (e.g. engines) were not considered for sending to depot for replacement. 15 years ago
frosch c22e462d96 (svn r18568) -Codechange: Bail out early. 15 years ago
frosch fec93aef84 (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. 15 years ago
rubidium 0508f789e9 (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. 15 years ago
rubidium 730f0483b9 (svn r18536) -Fix [FS#3386]: MSVC warning. Patch by pavel1269 15 years ago
peter1138 5b07373aab (svn r18479) -Fix (r6532): Direction is accounted for long before motion counter is updated 15 years ago
rubidium 8d8207e285 (svn r18468) -Codechange: make sure one never makes self-loops using Vehicle::SetNext 15 years ago
rubidium 6600610e47 (svn r18402) -Codechange: unify/centralise the code for crashing vehicles 15 years ago
rubidium 6278f0b8a9 (svn r18385) -Cleanup: remove the now unneeded multistop slot management code 15 years ago
frosch f9c3055445 (svn r17974) -Fix (r17926)[FS#3300]: C != T 15 years ago
frosch 6fba936a1f (svn r17930) -Fix (r17926): Aircraft were not carrying mail anymore, when CB15 was in use. 15 years ago
alberth 5a97b64d73 (svn r17928) -Codechange: ShowErrorMessage() now takes the summary string before the details string.
Gentlemen, swap your string parameters.
15 years ago
frosch 9fafef56d0 (svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides. 15 years ago
frosch 020c53fc7e (svn r17899) -Codechange: Deduplicate code for refitting vehicles. 15 years ago
frosch 23980e6486 (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.
15 years ago
frosch 4cb5a3e8a2 (svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present. 15 years ago
rubidium 982b8ee5fc (svn r17693) -Cleanup: remove some unneeded includes 15 years ago
rubidium ed8788d581 (svn r17682) -Codechange: remove erroneous space before some commas 15 years ago
frosch 1192ed4c2d (svn r17594) -Fix: Vehicle image was not always updated when needed. 15 years ago
rubidium 4db98357ea (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. 15 years ago
rubidium c2c0f4403e (svn r17534) -Codechange: unify the naming of callback masks/flags 15 years ago
frosch 0e36260337 (svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability. 15 years ago
rubidium a79be4de27 (svn r17363) -Fix [FS#3163] (r16717): feed autoreplace the front of vehicles, otherwise it gets distracted and bails out 15 years ago
rubidium 99d46e0ad7 (svn r17248) -Fix: add GPL license notice where appropriate 15 years ago
frosch 0ddf9c86e1 (svn r17209) -Codechange: Move cargo_type from (Rail|Road|Ship)VehicleInfo to EngineInfo. 15 years ago
smatz df4dbfec23 (svn r17091) -Fix (r17089)(r17090): regression test was right 15 years ago
smatz 1fcdb149d3 (svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp 15 years ago
smatz 096aca2479 (svn r17085) -Codechange: unify the place where vehicle's cargo ages 15 years ago
smatz 4a39f236fa (svn r17084) -Codechange: _age_cargo_skip_counter is common to all vehicle types 15 years ago
rubidium 5bb7b8ad35 (svn r17062) -Change: unify the naming of some 125 strings 15 years ago
rubidium 04ee98df52 (svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message 15 years ago
rubidium 49fcb20a91 (svn r16919) -Codechange: unify some more StringID w.r.t. their naming 15 years ago
rubidium 9eaee690bc (svn r16908) -Codechange: s/DepotWaypointReservation/DepotReservation/ 15 years ago
frosch fec6129cd1 (svn r16894) -Codechange: Add [Specialised]Vehicle::Last(). 15 years ago
smatz 8718babe90 (svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get() 15 years ago
smatz 64de470917 (svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft 15 years ago
smatz 98b8479f56 (svn r16813) -Codechange: make IsEngineCountable() member of Vehicle 15 years ago
rubidium 5fe30de455 (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. 15 years ago
rubidium f97bd41ed4 (svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle. 15 years ago
smatz 1e1f0ab2cf (svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train 15 years ago
smatz 20fedeb3d6 (svn r16717) -Codechange: make IsFrontEngine() member of Train 15 years ago
rubidium 4f99508114 (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.
15 years ago
smatz f6a4d61cca (svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile() 15 years ago
smatz d2ad6d38be (svn r16544) -Codechange: use double-linked list for vehicle position caches in order to improve performance (~5% with many vehicles) 15 years ago
smatz af85994f7f (svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check 15 years ago
frosch 289e8a7f45 (svn r16525) -Codechange: Notify small ufos on deletion of road vehicles, so they can head for somewhere else instead of stumbling over a ghost. 15 years ago
alberth 580e478e4e (svn r16491) -Codechange: Added parentheses around bitwise operators for code style. 15 years ago
rubidium f540a86f95 (svn r16477) -Fix [FS#2936] (r12650): loading indicator when 'unload' in and 'no loading' is off was pointing to the wrong direction. 15 years ago
smatz 11d88765cc (svn r16472) -Codechange: set vehicle type in SpecializedVehicle constructor instead of constructor of each vehicle type 15 years ago
smatz fa4f521e82 (svn r16451) -Fix (r16449): crash when a spectator (or dedicated server) received news about new engine 15 years ago
yexo f044ad6f80 (svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them. 15 years ago
rubidium d39f442bd0 (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) 15 years ago
rubidium 2832d69272 (svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts. 15 years ago
rubidium c496a3e014 (svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it. 15 years ago
frosch eeb3f75cfe (svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted. 15 years ago
frosch 6e06e82bc4 (svn r16414) -Change: Make it harder to ignore/close important error messages. Esp. do not close them automatically after some time. 15 years ago
rubidium 6cfc38b97c (svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle 15 years ago
rubidium cd382b28a3 (svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier. 15 years ago
rubidium 4c0542c17f (svn r16393) -Codechange: move VehicleRail to Train. 15 years ago
rubidium 6350648a6c (svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train 15 years ago
rubidium 1324100d69 (svn r16391) -Codechange: use Train instead of Vehicle where appropriate. 15 years ago
rubidium 489253b630 (svn r16390) -Codechange: move u.road to RoadVehicle. 15 years ago
rubidium 1ceb349779 (svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate 15 years ago
rubidium 4ae19b7451 (svn r16388) -Codechange: move u.air to Aircraft 15 years ago
rubidium 1e853b1226 (svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate 15 years ago
rubidium 86fc432293 (svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle. 15 years ago
smatz 50624d5c0f (svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved 15 years ago
smatz 70d3ed15c8 (svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted 15 years ago
smatz 6636ed7589 (svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too 15 years ago
smatz 0c10daa243 (svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index) 15 years ago
smatz d495dc5dbc (svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index) 15 years ago
yexo d489f93473 (svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct 15 years ago
smatz c189a15e3e (svn r16302) -Codechange: remove Vehicle::AllocateList 15 years ago
smatz 09d16b4106 (svn r16299) -Fix (r16242): don't use DoCommandP when the function can be called from another command 15 years ago
rubidium 9777d0cfd6 (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. 15 years ago
frosch 8bb92c110d (svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code. 15 years ago
rubidium 241af768f0 (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
15 years ago
frosch f1347ded2b (svn r16240) -Fix: Make 'stop in depot'-orders only apply on the target depot, not those which are entered on the way to them. 15 years ago
frosch c95bbdc6c1 (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.
15 years ago
frosch cf0bc6e649 (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. 15 years ago
rubidium b5f7583472 (svn r16187) -Fix [FS#2871]: do mark the "go to depot X" order fulfilled when reaching any depot, but only when reaching depot X. 15 years ago
smatz cc6955ce47 (svn r16178) -Fix [FS#2866]: don't try to reserve path for trains crashed in station 15 years ago
rubidium 5c5b357043 (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. 15 years ago
rubidium e0e9a1b02e (svn r16114) -Cleanup: unify some more strings and remove some more unused strings 15 years ago
rubidium 51288dee9d (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
15 years ago
rubidium fc1607a763 (svn r16048) -Fix/Feature-ish [FS#2740]: don't warn that crashed vehicles are getting old; upgrading them is impossible (racetrack) 15 years ago
rubidium c3e87f345d (svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too 16 years ago
rubidium f3e0fd7416 (svn r15711) -Codechange: lots of whitespace cleanup/fixes 16 years ago
smatz 4c6afbbbe2 (svn r15704) -Cleanup: remove further includes from recently split files 16 years ago
frosch d86e821f53 (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. 16 years ago
rubidium 473c210368 (svn r15699) -Codechange: split Cmd* from vehicle.cpp to vehicle_cmd.cpp. 16 years ago
rubidium bc11c9e5a5 (svn r15681) -Cleanup: remove unneeded forward declaration. 16 years ago
rubidium b003536ea8 (svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove. 16 years ago
rubidium 9d0c77b123 (svn r15672) -Codechange: (left,right,top,bottom)_coord -> coord.(left,right,top,bottom), i.e. use Rect. 16 years ago
michi_cc 80133f67ea (svn r15652) -Fix [FS#2706]: new (this) is seldom a good idea as destructors of member variables aren't run causing memory leaks. 16 years ago
smatz 488b7e6bf6 (svn r15624) -Fix (r15621): warning about comparing signed and unsigned integer types 16 years ago
peter1138 85569a4559 (svn r15622) -Codechange: Duplication. 16 years ago
peter1138 c50730d57b (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) 16 years ago
smatz 1f42f44092 (svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT 16 years ago
frosch abe4692da2 (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.
16 years ago
frosch 8aab3b09f5 (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. 16 years ago
rubidium 5c8cf85613 (svn r15434) -Codechange: bit of type safety for the DC_xxx flags. 16 years ago
rubidium 89e1afdaa0 (svn r15428) -Codechange: consistently use colour instead of having both color and colour. 16 years ago
rubidium a49197f522 (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. 16 years ago
smatz c50d947784 (svn r15318) -Fix [FS#2594](r10288): don't warn about non-primary engines getting old 16 years ago
smatz 9021c20b5e (svn r15299) -Cleanup: remove many redundant includes 16 years ago
smatz ca45774160 (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
16 years ago
truebrain c2406cd42d (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
16 years ago
rubidium c305a35e45 (svn r14990) -Codechange: handle articulated RVs and trams more strictly in GetStationTileForVehicle and CanVehicleUseStation (based on idea by Swallow) 16 years ago
smatz c5db2ea181 (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).
16 years ago
rubidium 0543f50181 (svn r14952) -Codechange: unify the "can vehicle go to station" tests 16 years ago
rubidium 28ea38ae55 (svn r14949) -Cleanup: pointer coding style 16 years ago
rubidium c0e7434f38 (svn r14944) -Cleanup: add spaces around some operators 16 years ago
rubidium d197060137 (svn r14933) -Codechange: check the whether a pool item can be constructed instead of trying to make it and check for NULL. 16 years ago
frosch eec8c04586 (svn r14925) -Fix [FS#2500]: Abort dragging of vehicles in the group window when they are deleted. 16 years ago
smatz ec7ebf2170 (svn r14835) -Change: apply the 'warn if train's income is negative' setting to other vehicle types, too 16 years ago
smatz b1f7ef7076 (svn r14831) -Codechange: use {VEHICLE} instead of Train/Ship/Road veh/Aircraft/{STRING} {COMMA} in lang files (part by Swallow) 16 years ago
smatz 91233ea596 (svn r14828) -Codechange: move most of save/load-specific code to separate files 16 years ago
rubidium f316796629 (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) 16 years ago