rubidium
30f2afac9b
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
e2e26190d5
(svn r20623) -Codechange: unify the storing of animation related information
14 years ago
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.
14 years ago
rubidium
d6cd62e633
(svn r20581) -Codechange: simplify getting the station in CalcPercentVehicleFilled
14 years ago
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.
14 years ago
alberth
35fec79700
(svn r20499) -Doc: Spelling fixes, and one doxygen comment addition.
14 years ago
rubidium
29b489a055
(svn r20437) -Codechange: lets Engines use GRFFilePropsBase as well
14 years ago
alberth
5cfc029523
(svn r20391) -Fix [FS#3993]: Prevent buying more vehicles than allowed.
14 years ago
alberth
e0e66b6ed0
(svn r20390) -Codechange: Move company vehicle counting to vehicle.cpp.
14 years ago
frosch
4bd32799f1
(svn r20286) -Codechange: Unify end of doxygen comments.
14 years ago
frosch
ed4f806f1d
(svn r20283) -Codechange: Unify start of doygen comments.
14 years ago
yexo
dd7800ea18
(svn r20234) -Fix [FS#3988]: refit costs from refit orders are subtracted from the vehicle yearly income
14 years ago
terkhen
8858729ae7
(svn r20142) -Fix [FS#3880]: Ships were not marked as dirty when stopping inside a depot.
14 years ago
frosch
1055c2b0fd
(svn r20106) -Fix (r5999): Engine and vehicle age were clamped at 0xFFFF, though there are 32bit available.
14 years ago
michi_cc
811f0db597
(svn r20098) -Fix [FS#3898]: A train reversing in a station would sometimes fail to release its reserved path.
14 years ago
alberth
604e56adc2
(svn r20025) -Doc: Fix/add comments to let Doxygen know about the documentation.
14 years ago
frosch
e931399b31
(svn r20005) -Codechange: Enumify force_proceed.
14 years ago
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.
15 years ago
terkhen
3287f91893
(svn r19963) -Add: Stop a vehicle after it crashes or is destroyed.
15 years ago
frosch
1d3adb2b66
(svn r19931) -Fix (r19914): Convert assertion in Backup<> destructor into DEBUG() output. It was triggered on exceptions, especially when aborting world generation.
15 years ago
frosch
9db3cde73a
(svn r19914) -Codechange: Wrap a helper class around temporary assignments of _current_company to ensure proper restoration.
15 years ago
smatz
00a52cc475
(svn r19756) -Codechange: move UpdateViewport() from Vehicle to SpecializedVehicle in order to improve performance
15 years ago
rubidium
f56ebd81c3
(svn r19709) -Feature: NewGRF debugging/inspecting of (primarily) enabled callbacks and values of variables
15 years ago
smatz
0ef33548c2
(svn r19614) -Codechange: "it's" => "its" where appropriate
15 years ago
alberth
05d705e077
(svn r19494) -Codechange: Remove _error_message.
15 years ago
yexo
c4a88ce022
(svn r19455) -Codechange: split all airport information in Station to a seperate class
15 years ago
alberth
7cc68f493d
(svn r19405) -Codechange: CheckOwnership() returns a CommandCost.
15 years ago
alberth
55f8d5d802
(svn r19369) -Codechange: EnsureNoTrainOnTrackBits() returns a CommandCost now.
15 years ago
alberth
6eac50bc16
(svn r19366) -Codechange: Move setting of _error_message from the callback check routine to the caller.
15 years ago
alberth
29b79e03e8
(svn r19365) -Codechange: Move EnsureNoTrainOnTrackProc() to src/vehicle.cpp.
15 years ago
alberth
c395b93acd
(svn r19319) -Codechange: EnsureNoVehicleOnGround() returns a CommandCost.
15 years ago
yexo
404df87b1f
(svn r19295) -Codechange: introduce wrapper functions for GRFConfig::name/info
15 years ago
alberth
63dd6ce6b0
(svn r19291) -Codechange: Rename HasVehicleOnTunnelBridge() to TunnelBridgeIsFree() and return a CommandCost status.
15 years ago
alberth
993d82b879
(svn r19289) -Codechange: Move _error_message assignment from check routine to caller.
15 years ago
alberth
8408b42dee
(svn r19288) -Codechange: Move EnsureNoVehicleOnGround() and HasVehicleOnTunnelBridge() functions.
15 years ago
alberth
d7698bb6db
(svn r19282) -Doc: Add some doxygen doc markup.
15 years ago
smatz
f051066bc4
(svn r19224) -Codechange: change parameters passed to ShowErrorMessage() a bit
15 years ago
frosch
63b01f2009
(svn r19218) -Feature: [NewGRF] Add CB36 support for aircraft properties 0F and 11. (Eddi)
15 years ago
smatz
d155794605
(svn r18978) -Fix [FS#3584](r14753): possible invalid memory access when merging companies
15 years ago
rubidium
f94c83a387
(svn r18872) -Codechange: introduce PaletteID and use it
15 years ago
rubidium
4d93b704d9
(svn r18866) -Codechange: remove the CmdFailed(ret)/CmdSucceeded(ret) wrapper functions
15 years ago
rubidium
aaf0b4b46c
(svn r18812) -Codechange: make some functions in train.h functions of Train.
15 years ago
rubidium
82fc28f77f
(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
e4af35d316
(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
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
15 years ago
frosch
640442ae03
(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
4434422c11
(svn r18568) -Codechange: Bail out early.
15 years ago
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.
15 years ago
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.
15 years ago
rubidium
5c2b6a8943
(svn r18536) -Fix [FS#3386]: MSVC warning. Patch by pavel1269
15 years ago
peter1138
5a8353fafc
(svn r18479) -Fix (r6532): Direction is accounted for long before motion counter is updated
15 years ago
rubidium
ae92fd2865
(svn r18468) -Codechange: make sure one never makes self-loops using Vehicle::SetNext
15 years ago
rubidium
19fa38601d
(svn r18402) -Codechange: unify/centralise the code for crashing vehicles
15 years ago
rubidium
0ef0e13795
(svn r18385) -Cleanup: remove the now unneeded multistop slot management code
15 years ago
frosch
828729344d
(svn r17974) -Fix (r17926)[FS#3300]: C != T
15 years ago
frosch
3a95e115fc
(svn r17930) -Fix (r17926): Aircraft were not carrying mail anymore, when CB15 was in use.
15 years ago
alberth
44aacfc59f
(svn r17928) -Codechange: ShowErrorMessage() now takes the summary string before the details string.
...
Gentlemen, swap your string parameters.
15 years ago
frosch
67cae40ec1
(svn r17926) -Fix (r9352): Make the decision whether aircraft carry mail consistent. Now always the cargo class decides.
15 years ago
frosch
00aca63b48
(svn r17899) -Codechange: Deduplicate code for refitting vehicles.
15 years ago
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.
15 years ago
frosch
f3aacb8fe3
(svn r17725) -Codechange: Reduce usage of EngInfo and XxxVehInfo, esp. when a Engine * is already present.
15 years ago
rubidium
d6cded5380
(svn r17693) -Cleanup: remove some unneeded includes
15 years ago
rubidium
e9624fe0cc
(svn r17682) -Codechange: remove erroneous space before some commas
15 years ago
frosch
7fa4d576ca
(svn r17594) -Fix: Vehicle image was not always updated when needed.
15 years ago
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.
15 years ago
rubidium
64bafcbe18
(svn r17534) -Codechange: unify the naming of callback masks/flags
15 years ago
frosch
ebd916be3d
(svn r17532) -Codechange: Rename several Invalidate functions to SetDirty for more consistency and distinguishability.
15 years ago
rubidium
6b2ff71e2c
(svn r17363) -Fix [FS#3163] (r16717): feed autoreplace the front of vehicles, otherwise it gets distracted and bails out
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
frosch
8bd029015e
(svn r17209) -Codechange: Move cargo_type from (Rail|Road|Ship)VehicleInfo to EngineInfo.
15 years ago
smatz
50d03a8751
(svn r17091) -Fix (r17089)(r17090): regression test was right
15 years ago
smatz
88a2d688da
(svn r17089) -Codechange: move RunVehicleDayProc() to vehicle.cpp
15 years ago
smatz
adcc5338f3
(svn r17085) -Codechange: unify the place where vehicle's cargo ages
15 years ago
smatz
9c25f1bdb7
(svn r17084) -Codechange: _age_cargo_skip_counter is common to all vehicle types
15 years ago
rubidium
4b2592dbc0
(svn r17062) -Change: unify the naming of some 125 strings
15 years ago
rubidium
2962d8f0fc
(svn r16920) -Codechange: shuffle some strings around to simplify looking up vehicle type specific strings for a specific message
15 years ago
rubidium
c17c31b5b6
(svn r16919) -Codechange: unify some more StringID w.r.t. their naming
15 years ago
rubidium
2646a99d29
(svn r16908) -Codechange: s/DepotWaypointReservation/DepotReservation/
15 years ago
frosch
d5a4c89365
(svn r16894) -Codechange: Add [Specialised]Vehicle::Last().
15 years ago
smatz
1f29e38b83
(svn r16849) -Codechange: replace GetCargo() by CargoSpec::Get()
15 years ago
smatz
b6960e4e17
(svn r16814) -Codechange: make IsNormalAircraft() member of Aircraft
15 years ago
smatz
868c21cbcc
(svn r16813) -Codechange: make IsEngineCountable() member of Vehicle
15 years ago
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.
15 years ago
rubidium
61e735ba4c
(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.
15 years ago
smatz
d86e17d65a
(svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train
15 years ago
smatz
adc5363202
(svn r16717) -Codechange: make IsFrontEngine() member of Train
15 years ago
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.
15 years ago
smatz
8343340acb
(svn r16643) -Codechange: replace GetStationByTile() by Station::GetByTile()
15 years ago
smatz
249b6e6798
(svn r16544) -Codechange: use double-linked list for vehicle position caches in order to improve performance (~5% with many vehicles)
16 years ago
smatz
0c10006907
(svn r16527) -Codechange: use static member functions instead of simple casts when converting Vehicle to specialised vehicle types. Includes safety check
16 years ago
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.
16 years ago
alberth
bab70a823d
(svn r16491) -Codechange: Added parentheses around bitwise operators for code style.
16 years ago
rubidium
75a818a325
(svn r16477) -Fix [FS#2936] (r12650): loading indicator when 'unload' in and 'no loading' is off was pointing to the wrong direction.
16 years ago
smatz
8c11d612e4
(svn r16472) -Codechange: set vehicle type in SpecializedVehicle constructor instead of constructor of each vehicle type
16 years ago
smatz
5cd998b7a4
(svn r16451) -Fix (r16449): crash when a spectator (or dedicated server) received news about new engine
16 years ago
yexo
0d56cfabfa
(svn r16439) -Change: Make the default vehicle servicing settings company-based settings, so in a multiplayer game everyone can change them.
16 years ago
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)
16 years ago
rubidium
168ae6f7e2
(svn r16422) -Codechange: use const_cast for removing const and warn when const is (accidentally?) removed using C-style casts.
16 years ago
rubidium
0d99b6c71c
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
16 years ago
frosch
a4557c7da4
(svn r16416) -Fix [FS#2912]: Rework deleting of news when referenced vehicles/stations/industries are deleted.
16 years ago
frosch
8109a74c95
(svn r16414) -Change: Make it harder to ignore/close important error messages. Esp. do not close them automatically after some time.
16 years ago
rubidium
86710c5185
(svn r16397) -Codechange: move GetVehicleOrder/GetLastVehicleOrder into Vehicle
16 years ago
rubidium
6237fe1462
(svn r16394) -Codechange: move (NewGRF) cache variables into a separate struct so (some vehicle related) NewGRF cache 'desyncs' can be tested easier.
16 years ago
rubidium
da5661a0c8
(svn r16393) -Codechange: move VehicleRail to Train.
16 years ago
rubidium
c4b627af42
(svn r16392) -Codechange: move some variables (the ones that aren't caches) from VehicleRail to Train
16 years ago
rubidium
80e94b9bb1
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
16 years ago
rubidium
7a37220881
(svn r16390) -Codechange: move u.road to RoadVehicle.
16 years ago
rubidium
d37b840cf3
(svn r16389) -Codechange: use RoadVehicle instead of Vehicle where appropriate
16 years ago
rubidium
c882248348
(svn r16388) -Codechange: move u.air to Aircraft
16 years ago
rubidium
ada3067960
(svn r16387) -Codechange: use Aircraft instead of Vehicle where appropriate
16 years ago
rubidium
441011b782
(svn r16382) -Codechange: make GetVehicleTrackdir a member function of Vehicle.
16 years ago
smatz
62a7948af0
(svn r16378) -Codechange: replace OldPool with simpler Pool. Compilation time, binary size and run time (with asserts disabled) should be improved
16 years ago
smatz
b687ac51ee
(svn r16376) -Codechange: Vehicle::Tick() now returns false if the vehicle was deleted
16 years ago
smatz
70aab8bf04
(svn r16354) -Codechange: use 'new' pool accessors and methods for Engine too
16 years ago
smatz
871107f529
(svn r16327) -Codechange: replace IsValidPoolItemID(index) by PoolItem::IsValidID(index)
16 years ago
smatz
6221d74644
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
yexo
31eff1d4c3
(svn r16315) -Codechange: move the autorenew settings to a new CompanySettings struct
16 years ago
smatz
a1addc1d95
(svn r16302) -Codechange: remove Vehicle::AllocateList
16 years ago
smatz
2bc5189ad5
(svn r16299) -Fix (r16242): don't use DoCommandP when the function can be called from another command
16 years ago
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.
16 years ago
frosch
677ea100b3
(svn r16260) -Codechange: Add Vehicle::IncrementOrderIndex() to deduplicate some code.
16 years ago
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
16 years ago
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.
16 years ago
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.
16 years ago
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.
16 years ago
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.
16 years ago
smatz
8dc0632b78
(svn r16178) -Fix [FS#2866]: don't try to reserve path for trains crashed in station
16 years ago
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.
16 years ago
rubidium
2ec09d95a1
(svn r16114) -Cleanup: unify some more strings and remove some more unused strings
16 years ago
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
16 years ago
rubidium
8a39da7618
(svn r16048) -Fix/Feature-ish [FS#2740]: don't warn that crashed vehicles are getting old; upgrading them is impossible (racetrack)
16 years ago
rubidium
b25a4f8231
(svn r15718) -Cleanup: apply some comment coding style on the rest of the sources too
16 years ago
rubidium
9d018723b7
(svn r15711) -Codechange: lots of whitespace cleanup/fixes
16 years ago
smatz
40745dc0d9
(svn r15704) -Cleanup: remove further includes from recently split files
16 years ago
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.
16 years ago
rubidium
070320f25b
(svn r15699) -Codechange: split Cmd* from vehicle.cpp to vehicle_cmd.cpp.
16 years ago
rubidium
55ce735c2c
(svn r15681) -Cleanup: remove unneeded forward declaration.
16 years ago
rubidium
655b0ccc2e
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
16 years ago
rubidium
fb2ea6c9ed
(svn r15672) -Codechange: (left,right,top,bottom)_coord -> coord.(left,right,top,bottom), i.e. use Rect.
16 years ago
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.
16 years ago
smatz
a92cd2b72e
(svn r15624) -Fix (r15621): warning about comparing signed and unsigned integer types
16 years ago
peter1138
7dd6f218ef
(svn r15622) -Codechange: Duplication.
16 years ago
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)
16 years ago
smatz
425fe86a3d
(svn r15569) -Codechange: replace MallocT + memset( 0 ) calls by CallocT
16 years ago
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.
16 years ago
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.
16 years ago
rubidium
d846eef0b6
(svn r15434) -Codechange: bit of type safety for the DC_xxx flags.
16 years ago
rubidium
c0a8d09ca7
(svn r15428) -Codechange: consistently use colour instead of having both color and colour.
16 years ago
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.
16 years ago
smatz
9723630cea
(svn r15318) -Fix [FS#2594](r10288): don't warn about non-primary engines getting old
16 years ago