glx
16dd93d3fb
(svn r22048) -Fix (r4495): company 0 does not always exist, so put temporary vehicles in a valid company
14 years ago
terkhen
0e51dab6a6
(svn r21924) -Codechange: Unify some parts of the articulated vehicle code.
...
-Cleanup: Avoid conversions to Train and RoadVehicle that are no longer required.
14 years ago
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.
14 years ago
terkhen
44a10ac857
(svn r21858) -Codechange: Give more similar names to ArticulatedPart functions.
14 years ago
terkhen
cfbbcf1597
(svn r21858) -Codechange: Give more similar names to ArticulatedPart functions.
14 years ago
terkhen
f69d280f14
(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
14 years ago
terkhen
48b7916458
(svn r21521) -Codechange: Unify some cached values that were present in both road vehicles and trains.
14 years ago
terkhen
14100e9798
(svn r21517) -Codechange: Add IsGroundVehicle function to the Engine class.
14 years ago
terkhen
d6959dcc6b
(svn r21517) -Codechange: Add IsGroundVehicle function to the Engine class.
14 years ago
terkhen
c7a2d1f883
(svn r21123) -Codechange: Remove max_speed from the Vehicle class.
14 years ago
terkhen
6a38925ca3
(svn r21123) -Codechange: Remove max_speed from the Vehicle class.
14 years ago
rubidium
360d6daf34
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
30f2afac9b
(svn r20632) -Cleanup: remove "a few" unneeded includes, and add them to some headers
14 years ago
rubidium
8c85b4ce3d
(svn r20281) -Codechange: unify case scope closure + break coding style
14 years ago
rubidium
e356cb9405
(svn r20281) -Codechange: unify case scope closure + break coding style
14 years ago
alberth
e3b24801e2
(svn r19132) -Codechange: No need to end a line with ;;.
15 years ago
alberth
33a96b5ef3
(svn r19132) -Codechange: No need to end a line with ;;.
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
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
frosch
bc19dd6a25
(svn r18566) -Codechange: When both the union and intersection of refit masks of articulated vehicles are needed, they can be determined at once.
15 years ago
frosch
1e1fa9ff2e
(svn r18566) -Codechange: When both the union and intersection of refit masks of articulated vehicles are needed, they can be determined at once.
15 years ago
peter1138
d2ee7941f5
(svn r17911) -Codechange: bool * is a pointer, not a bool
15 years ago
peter1138
bcb33b50ac
(svn r17911) -Codechange: bool * is a pointer, not a bool
15 years ago
frosch
1996e93edf
(svn r17907) -Codechange: Deduplicate result interpretation of articulated vehicle callback.
15 years ago
frosch
abbaed60d3
(svn r17907) -Codechange: Deduplicate result interpretation of articulated vehicle callback.
15 years ago
frosch
241415e76a
(svn r17728) -Cleanup: Remove some more unneeded/unused parameters.
15 years ago
frosch
9a9d0ee7c0
(svn r17728) -Cleanup: Remove some more unneeded/unused parameters.
15 years ago
frosch
b25f03a447
(svn r17726) -Cleanup: Remove some unneeded/unused parameters.
15 years ago
frosch
7a8a97e68a
(svn r17726) -Cleanup: Remove some unneeded/unused parameters.
15 years ago
frosch
2adc2f4324
(svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation.
15 years ago
frosch
b243f6ca97
(svn r17700) -Codechange: Integrate ShipVehicleInfo::refittable into EngineInfo::refit_mask during initialisation.
15 years ago
frosch
a9717da0d3
(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.
15 years ago
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.
15 years ago
rubidium
c2c0f4403e
(svn r17534) -Codechange: unify the naming of callback masks/flags
15 years ago
rubidium
64bafcbe18
(svn r17534) -Codechange: unify the naming of callback masks/flags
15 years ago
rubidium
99d46e0ad7
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
rubidium
7fbc33dae1
(svn r17248) -Fix: add GPL license notice where appropriate
15 years ago
smatz
32bf91aa41
(svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train
15 years ago
smatz
6a0855f0d1
(svn r16723) -Codechange: make GetNextArticPart(), GetLastEnginePart(), GetNextVehicle(), GetPrevVehicle(), GetNextUnit(), GetPrevUnit() members of Train
15 years ago
rubidium
18fbe0aac4
(svn r16722) -Codechange: unify the naming of the Is/Set/HasArticulatedPart functions
15 years ago
rubidium
4d14c1b534
(svn r16722) -Codechange: unify the naming of the Is/Set/HasArticulatedPart functions
15 years ago
rubidium
f97bd41ed4
(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.
15 years ago
rubidium
61e735ba4c
(svn r16721) -Codechange: make Is/SetRoadVehicleFront, Is/Set/HasArticulatedPart member of RoadVehicle.
15 years ago
smatz
9b10bc9cdf
(svn r16720) -Codechange: make Set/ClearFrontEngine(), Set/ClearArticulatedPart(), Set/ClearWagon(), Set/ClearEngine(), Set/ClearFreeWagon() and Set/ClearMultiheaded() members of Train
15 years ago
smatz
77eaefb61c
(svn r16720) -Codechange: make Set/ClearFrontEngine(), Set/ClearArticulatedPart(), Set/ClearWagon(), Set/ClearEngine(), Set/ClearFreeWagon() and Set/ClearMultiheaded() members of Train
15 years ago
smatz
1e1f0ab2cf
(svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train
15 years ago
smatz
d86e17d65a
(svn r16719) -Codechange: make IsArticulatedPart(), IsTrainEngine(), IsTrainWagon(), IsMultiheaded(), EngineHasArticPart() and IsRearDualheaded() members of Train
15 years ago
frosch
ce55eda3e1
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
15 years ago
frosch
1e09854cb7
(svn r16679) -Codechange: Let GetCapacityOfArticulatedParts() return a CargoArray instead of a pointer to a static array.
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
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
rubidium
37b391901a
(svn r16426) -Fix [FS#2921] (r16390): articulated parts got the wrong image assigned
16 years ago
rubidium
462c1ec4f3
(svn r16426) -Fix [FS#2921] (r16390): articulated parts got the wrong image assigned
16 years ago
rubidium
c496a3e014
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
16 years ago
rubidium
0d99b6c71c
(svn r16421) -Codechange: do not unnecessarily remove constness or unnecessarily add it.
16 years ago
frosch
e60a1ec090
(svn r16412) -Cleanup: Shuffle vehicle pointers in AddArticulatedParts(), and remove two of them.
16 years ago
frosch
855edb0839
(svn r16412) -Cleanup: Shuffle vehicle pointers in AddArticulatedParts(), and remove two of them.
16 years ago
frosch
8ae1c5d908
(svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself.
16 years ago
frosch
0337485284
(svn r16411) -Fix (r16390): Building articulated roadvehicles caused infinite loop due to v->Next() pointing to v itself.
16 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.
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
4c0542c17f
(svn r16393) -Codechange: move VehicleRail to Train.
16 years ago
rubidium
da5661a0c8
(svn r16393) -Codechange: move VehicleRail to Train.
16 years ago
rubidium
6350648a6c
(svn r16392) -Codechange: move some variables (the ones that aren't caches) from 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
1324100d69
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
16 years ago
rubidium
80e94b9bb1
(svn r16391) -Codechange: use Train instead of Vehicle where appropriate.
16 years ago
rubidium
489253b630
(svn r16390) -Codechange: move u.road to RoadVehicle.
16 years ago
rubidium
7a37220881
(svn r16390) -Codechange: move u.road to RoadVehicle.
16 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
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
d495dc5dbc
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
smatz
6221d74644
(svn r16325) -Codechange: replace GetPoolItem(index) by PoolItem::Get(index)
16 years ago
frosch
2431cc099e
(svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark)
16 years ago
frosch
32ecc48ec8
(svn r16303) -Codechange: Use the question mark as default sprite when creating vehicles, instead of arbitrary sprites not related to the vehicle. (though that also applies to the question mark)
16 years ago
smatz
c189a15e3e
(svn r16302) -Codechange: remove Vehicle::AllocateList
16 years ago
smatz
a1addc1d95
(svn r16302) -Codechange: remove Vehicle::AllocateList
16 years ago
frosch
c297a99eff
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
16 years ago
frosch
6dd04a9a78
(svn r15763) -Codechange/Fix: Add Engine::GetDisplayDefaultCapacity() and use it everywhere, so CB 36 is also used everywhere.
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
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
b003536ea8
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
16 years ago
rubidium
655b0ccc2e
(svn r15676) -Codechange: remove the need for BeginVehicleMove and merge VehiclePositionChanged and EndVehicleMove.
16 years ago
michi_cc
1c9749dba8
(svn r15655) -Codechange: Initialise vehicle vars only after a placement new so possible default constructors don't overwrite the values.
16 years ago
michi_cc
e982100fe6
(svn r15655) -Codechange: Initialise vehicle vars only after a placement new so possible default constructors don't overwrite the values.
16 years ago
frosch
90a81da62b
(svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16)
16 years ago
frosch
cfea2d428b
(svn r15654) -Fix: Only ever call any vehicle callbacks after the whole articulated engine has been built. (except 0x16)
16 years ago
frosch
da78726e0c
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
16 years ago
frosch
e01106f66b
(svn r15592) -Fix: Refit-info in purchase list did only check the first articulated part.
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
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
smatz
9021c20b5e
(svn r15299) -Cleanup: remove many redundant includes
16 years ago
smatz
0d3f5e6e74
(svn r15299) -Cleanup: remove many redundant includes
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
rubidium
f0b0691bfe
(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
62f3aa89f2
(svn r14903) -Fix: First create all articulated parts of roadvehicles, then call callback 36 capacity, also call it for all articulated parts.
16 years ago
frosch
aedc0c1302
(svn r14903) -Fix: First create all articulated parts of roadvehicles, then call callback 36 capacity, also call it for all articulated parts.
16 years ago
frosch
a3662216ee
(svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace.
16 years ago
frosch
1f31e117f0
(svn r13850) -Fix [FS#2146]: Fix resp. implement refitting of articulated vehicles during autoreplace.
16 years ago
frosch
ab31260386
(svn r13847) -Codechange: Add MAX_ARTICULATED_PARTS and set it to 100.
16 years ago