rubidium
2426f5342f
(svn r12459) -Codechange: split news.h into news_type.h and news_func.h.
2008-03-28 08:53:36 +00:00
smatz
3ab59da68a
(svn r12386) -Fix [FS#1841](r2428): train could break apart when reversed while partially in a depot
2008-03-19 20:50:19 +00:00
smatz
f45221f274
(svn r12384) -Fix (r2428): do not disconnect train when reversing, it may 'think' it is whole in a depot
2008-03-19 20:42:05 +00:00
glx
285a43037b
(svn r12380) -Fix: update train acceleration and max speed after setting cached value to ensure the correct max speed is used with disabled real acceleration
2008-03-17 22:13:00 +00:00
glx
cbcad325f9
(svn r12379) -Codechange: removed now redondant InvalidateWindow() calls
2008-03-17 22:04:15 +00:00
glx
187c7e19fe
(svn r12378) -Fix: refresh vehicle details window when cached values are updated
2008-03-17 21:50:53 +00:00
glx
08becf93e6
(svn r12377) -Fix [FS#1854]: set cached value for vehicle property 25 before other cached values
2008-03-17 21:49:14 +00:00
smatz
3d10ae7ec3
(svn r12369) -Fix (r1681): reset train speed limits when _patches.realistic_acceleration changes
2008-03-15 19:24:13 +00:00
smatz
1f13638d03
(svn r12368) -Codechange: use explicit body for loops and conditions and remove -Wno-empty-body from the configure script
2008-03-15 13:21:31 +00:00
peter1138
11c8050e3f
(svn r12332) -Fix (r12331): Invalidate cached data and update image after setting flag.
2008-03-03 21:42:37 +00:00
glx
d9d601b1ca
(svn r12331) -Feature: [NewGRF] vehicle variable FE bit 8
2008-03-03 20:56:30 +00:00
peter1138
f6e4dc4d8c
(svn r12209) -Fix: [NewGRF] Support using any base price for rail and road vehicles' running cost, and show running cost of wagons if they have it.
2008-02-21 19:09:10 +00:00
peter1138
0e997be11e
(svn r12205) -Codechange: rename RailVehicleInfo::running_cost_base to running_cost, inline with other vehicle types (It is the factor, not the base)
2008-02-20 20:56:54 +00:00
frosch
91297d4732
(svn r12203) -Fix (r12199): Make trains pay attention to signals again.
2008-02-20 19:37:46 +00:00
frosch
7f3d56041b
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
2008-02-20 17:49:50 +00:00
smatz
9bdb194b2a
(svn r12197) -Fix [FS#1788](r12134): show correct last year profit when the train had negative income
...
-Codechange: use GetDisplayProfitThisYear() to convert vehicle profit to readable form
2008-02-20 17:06:58 +00:00
smatz
7dbb21c69b
(svn r12194) -Codechange: apply coding style on enum TrainSubtype
2008-02-20 15:18:35 +00:00
smatz
0357c4306c
(svn r12189) -Codechange: mark some functions in train_cmd.cpp inline (called once or very short)
2008-02-20 12:07:22 +00:00
smatz
32d8ac2073
(svn r12188) -Codechange [FS#1782]: do not check twice for correct rail owner (patch by Vikthor)
2008-02-20 11:00:17 +00:00
smatz
4a329de942
(svn r12179) -Codechange: use GetCrossingRailTrack() and GetCrossingRailAxis() to improve code readability
2008-02-18 18:35:36 +00:00
smatz
97013cd8c4
(svn r12178) -Codechange: use the 'side' parameter in TrainController and TrainCheckIfLineEnds to simplify the code
2008-02-18 16:35:38 +00:00
smatz
fe48d0be21
(svn r12134) -Change: count the number of ticks a vehicle was running this day to calculate running cost
...
-Fix [FS#1739]: vehicle profit is now counted with 8bit fract, so it is now shown properly in the vehicle details window
2008-02-13 19:24:40 +00:00
smatz
391898b47a
(svn r12132) -Cleanup: convert pathfinder selection from if/else to switch/case at many places
2008-02-13 17:54:11 +00:00
smatz
4c5dde140b
(svn r12131) -Fix (r3374): with mammoth trains disabled, maximum train length was limited to 9
2008-02-13 16:49:25 +00:00
smatz
a3e3cd7d46
(svn r12129) -Change [FS#1759]: simplified patch settings for pathfinders (Yorick)
2008-02-13 14:21:36 +00:00
peter1138
3abf3e3fa4
(svn r12128) -Codechange: Replace last use of TrainPlayLeaveStationSound(v) with v->PlayLeaveStationSound(), and remove wrapper function.
2008-02-13 09:34:56 +00:00
frosch
f476d861d2
(svn r12085) -Fix(r12058): Road vehicles could get stuck, when NPF told them to reverse on junction tiles. (spotted by SmatZ)
2008-02-08 16:25:55 +00:00
belugas
7f5f48281c
(svn r12066) -Codechange: Rename GetBridge for the more common GetBridgeSpec
...
-Codechange: Remove direct access to the _bridge table in favor of the above mentioned GetBridgeSpec
-Codechange: Rationalize the use of Bridge type pointer
2008-02-05 05:21:02 +00:00
smatz
ebba0d7c71
(svn r12057) -Fix: slowdown train when approaching 90deg turn when 90deg turns are forbidden
2008-02-04 15:56:39 +00:00
glx
7ce12e50da
(svn r12037) -Codechange: replace OnNewDay_(Aircraft|RoadVeh|Ship|Train) with an OnNewDay method in the Vehicle class
2008-02-01 22:02:14 +00:00
smatz
f22b0127af
(svn r11996) -Fix [FS#1706]: update train statusbar when stopping from zero speed
2008-01-27 20:20:53 +00:00
smatz
8be486c27e
(svn r11960) -Cleanup: simplify some IsTunnel(Tile) / IsBridge(Tile) conditions
2008-01-23 14:51:36 +00:00
smatz
f05caedf7c
(svn r11922) -Codechange: use MaybeBarCrossingWithSound() to bar crossing with sound
2008-01-18 21:44:20 +00:00
smatz
dfb91c26ec
(svn r11916) -Codechange: use enums from VehicleViewWindowWidgets instead of constants
...
-Fix: refit button widget was not correctly updated
2008-01-18 13:02:47 +00:00
smatz
8dbf03e322
(svn r11910) -Fix: play 'ding-ding' crossing sound in more cases (except gameload and crossing construction)
...
-Fix: crossing sound is bound to tile, not to vehicle
2008-01-17 20:41:33 +00:00
smatz
b20d1eee6c
(svn r11908) -Fix: update crossing when merging a company, when building a crossing and after loading older savegame
2008-01-17 19:49:06 +00:00
smatz
2c38d3066f
(svn r11900) -Fix: set correctly crossing state after train reversal, train leaving crossing, train crash
...
Fixes several ways to leave crossing red forever or to leave it unbarred when there is a train on crossing
2008-01-17 17:57:39 +00:00
smatz
fc2895e8c2
(svn r11882) -Codechange: introduce MarkSingleVehicleDirty() and simplify the code at some places
2008-01-16 21:17:31 +00:00
smatz
3ad8b79550
(svn r11877) -Fix: another way to crash competitors' train in a station
...
-Codechange: increase the speed train is approaching line end/semaphore in non-diagonal direction a bit
2008-01-16 15:48:36 +00:00
smatz
70a9c544b8
(svn r11870) -Fix: slow down train when approaching tile we can't enter in more cases
...
(tunnel/bridge/depot from wrong direction, competitor's track, wrong railtype)
-Fix: do not make crossing red when we can't enter it in any case
2008-01-16 00:33:28 +00:00
rubidium
736640fd87
(svn r11866) -Codechange: swap OFB_* and OF_* so it conceptually in sync with other cases of *B_* vs *_* like VETSB_* and VETS_*.
2008-01-15 18:44:22 +00:00
smatz
81cad58c68
(svn r11864) -Codechange: pass owner whose signals we will update instead of complex detection later
2008-01-15 15:00:01 +00:00
smatz
c6de18c3db
(svn r11847) -Fix: do not affect the speed a train is entering a depot by trackbits behind it
2008-01-14 14:46:09 +00:00
smatz
a9f69f387d
(svn r11845) -Codechange: simplify train collision detection a bit
2008-01-13 23:53:33 +00:00
smatz
b3e28dc5ad
(svn r11835) -Fix: mark depot, viewports, vehicle lists and vehicle details dirty when a train crashes
2008-01-13 14:42:28 +00:00
rubidium
9c0c798dd8
(svn r11834) -Codechange: only include settings_type.h if needed.
2008-01-13 14:37:30 +00:00
smatz
86a6268f3e
(svn r11831) -Fix: call TrainConsistChanged() when removing crashed train part to be consistent with saveload process
2008-01-13 13:11:59 +00:00
rubidium
90acd52f22
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
2008-01-13 01:21:35 +00:00
peter1138
0f7392bd61
(svn r11822) -Codechange: Replaced fixed size custom name array. Names are now attached to their object directly and there is
...
no limit to the amount of names.
-Fix: NewGRF engines could not be renamed.
2008-01-12 19:58:06 +00:00
smatz
74f9be8f2c
(svn r11821) -Fix (r11802): 'optimization assert' when removing crashed wagon in some cases
2008-01-12 19:33:25 +00:00
smatz
9c9b743242
(svn r11820) -Fix: invalidate depot window when removing crashed train
2008-01-12 19:24:58 +00:00
smatz
b18b7f6f22
(svn r11819) -Fix: do not access the Vehicle struct that has been already deleted when removing crashed train
2008-01-12 19:20:44 +00:00
rubidium
2fc62eab05
(svn r11818) -Codechange: split player.h into smaller pieces.
2008-01-12 14:10:35 +00:00
smatz
fa1f94e599
(svn r11812) -Codechange: introduce TrainExitDir() to simplify some functions
2008-01-11 15:10:59 +00:00
smatz
bc4ed3eafd
(svn r11802) -Fix [FS#716]: do not crash trains when leaving depot to a very long track
...
-Codechange: use dedicated pathfinder for signal updating, resulting in better performance and possible future improvements
2008-01-09 23:00:59 +00:00
rubidium
2d2e1e3863
(svn r11800) -Codechange: move some functions to a more logical location + some type safety.
2008-01-09 21:05:03 +00:00
rubidium
0365c1f33b
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
2008-01-09 16:55:48 +00:00
peter1138
0ae26a0312
(svn r11789) -Codechange: coding style for global variable names
2008-01-09 10:15:20 +00:00
rubidium
64d691bacc
(svn r11787) -Codechange: more header rewrites. This time related to viewport.h.
2008-01-09 09:45:45 +00:00
rubidium
e2f7ec1d3e
(svn r11775) -Codechange: move all autoreplace/autorenew functions to a single location.
2008-01-07 09:19:53 +00:00
rubidium
444e77d8bc
(svn r11774) -Change: do not include variables.h in a header when it is not needed.
2008-01-07 00:57:19 +00:00
smatz
f02cf9281b
(svn r11760) -Codechange: unify the way how other end of a tunnel/bridge is determined at some places
...
-Fix: adding road/tram to tram/road bridge was cheaper by one tile
2008-01-04 19:45:29 +00:00
peter1138
5c23778065
(svn r11741) -Feature: Add support for NewGRF's train 'tilt' flag. Trains with tilt capability (specific details are per NewGRF set) will be given a 20% speed limit bonus on curves.
2008-01-01 22:24:18 +00:00
peter1138
c96fcfc21b
(svn r11738) -Codechange: Refactor realistic acceleration's curve counting to use DirDiffs instead of local tables, and remove an unnecessary loop.
2008-01-01 18:12:17 +00:00
peter1138
e5f50b6fde
(svn r11733) -Fix: Max speed for entering stations overrode the max speed of curves
2008-01-01 14:15:28 +00:00
peter1138
a1b482973d
(svn r11732) -Fix (r4150): elrail merge gave elrail, monorail & maglev unintended speed bonuses for curves, as the bonus was based on the railtype index. The bonus is now specified by a property of the railtype.
2008-01-01 14:00:31 +00:00
peter1138
2194b15fdd
(svn r11731) -Fix [FS#1582]: Clear sprite override data before performing NewGRF wagon attach callback. This stopped
...
the callback working for autoreplace and when moving wagons from train to train in a depot.
-Fix (r11724): Don't check wagon attach callback for the chain when moving a single wagon.
2007-12-31 21:51:16 +00:00
rubidium
fe71089b0e
(svn r11724) -Fix: make it impossible (for users) to circumvent the length checking of the NewGRF 'allow wagon attach' callback by moving several wagons at a time.
2007-12-30 21:35:48 +00:00
rubidium
445a733eb6
(svn r11719) -Codechange: split sound.h in a header with types and one with functions.
2007-12-29 09:24:26 +00:00
smatz
c10d3da133
(svn r11707) -Fix: do not allow refitting flooded (destroyed) vehicles
2007-12-27 14:10:47 +00:00
rubidium
722613f7f3
(svn r11706) -Codechange: split vehicle.h and remove another bunch of useless includes.
2007-12-27 13:35:39 +00:00
smatz
ae3206cd97
(svn r11705) -Fix [FS#1557]: trains could have sprites with wrong direction when reversing, also was inconsistent with save/load process (possible desyncs)
2007-12-27 13:25:23 +00:00
rubidium
db73addb43
(svn r11702) -Codechange: move all date related stuff to date*.
2007-12-26 13:50:40 +00:00
rubidium
f82aeb82c5
(svn r11701) -Codechange: removal unnecessary inclusions of map.h (and split map.h).
2007-12-26 11:45:43 +00:00
rubidium
81bf9f8503
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
2007-12-25 11:26:07 +00:00
rubidium
3074bca136
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
2007-12-21 22:50:51 +00:00
rubidium
766551b0bc
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
2007-12-21 21:50:46 +00:00
rubidium
8427b8bad2
(svn r11675) -Codechange: split the string types from the string functions.
2007-12-21 19:49:27 +00:00
rubidium
be923601bf
(svn r11669) -Codechange: refactor tile.h -> tile_type.h and tile_map.h
2007-12-19 23:26:02 +00:00
rubidium
0995194162
(svn r11661) -Codechange: some header reworks in order to try to reduce the compile time of OpenTTD by reduce the amount of circular-ish dependencies.
2007-12-18 19:52:14 +00:00
smatz
d56a690ba4
(svn r11649) -Codechange: some code can be simplified thanks to changes in r11642
2007-12-16 19:30:42 +00:00
smatz
926fe5c9e9
(svn r11644) -Codechange: merge some functions from tunnel_map.h and bridge_map.h into tunnelbridge_map.h
2007-12-16 15:38:51 +00:00
smatz
60f9bbd17e
(svn r11642) -Codechange: VehicleFromPos does check for v->tile == tile, so remove useless checks
2007-12-15 23:11:18 +00:00
smatz
57a83e7c76
(svn r11634) -Fix: update signals when deleting crashed train on a bridge, update even when train is rotated
2007-12-15 00:04:01 +00:00
smatz
d31506654c
(svn r11633) -Codechange: merge CheckTunnelEmpty and IsVehicleOnBridge into GetVehicleTunnelBridge
2007-12-14 23:21:20 +00:00
smatz
cd58045234
(svn r11623) -Fix [FS#1533] (r11619): assert when train is going over two crossings next to each other
2007-12-11 22:50:13 +00:00
smatz
3a62919ba3
(svn r11619) -Fix [FS#1531]: do not make crossing red behind depot the train is entering
2007-12-11 19:09:36 +00:00
glx
06c131b244
(svn r11567) -Fix [FS#1512] (r11011): break the chain before moving a vehicle after another in the same chain
2007-12-04 15:32:54 +00:00
skidd13
e36dba227b
(svn r11523) -Codechange: Move the CHANCE macros to core/random_func.cpp cause they depend on Random()
...
-Codechange: Convert the CHANCE macros to functions and rename them fitting to the naming style
2007-11-25 15:35:25 +00:00
skidd13
f92f3aec06
(svn r11485) -Codechange: Remove the doubled function ToggleBitT and rename the remaining to fit with the naming style
2007-11-20 14:11:19 +00:00
skidd13
3ae50673a3
(svn r11484) -Codechange: Remove the doubled function SetBitT and rename the remaining to fit with the naming style
2007-11-20 13:35:54 +00:00
skidd13
6801cceda1
(svn r11482) -Codechange: Remove the doubled function ClrBitT and rename the remaining to fit with the naming style
2007-11-19 21:32:20 +00:00
skidd13
c0a2c0c23e
(svn r11481) -Codechange: Rename the HASBIT function to fit with the naming style
2007-11-19 21:02:30 +00:00
skidd13
f4a5c80d71
(svn r11476) -Codechange: rename the function myabs to abs to get rid of an unneeded define
2007-11-19 18:58:04 +00:00
skidd13
98f66552be
(svn r11475) -Codechange: rename clamp and clampu to Clamp and ClampU to fit with the coding style
2007-11-19 18:38:10 +00:00
glx
9fcf6e7a43
(svn r11431) -Codechange: [NewGRF] Add support for changing rail vehicle user-defined bit mask (prop 25) via callback 36
2007-11-15 00:13:12 +00:00
truelight
b935a74782
(svn r11383) -Codechange: fixed all the mess around KillFirstBit (tnx to Rubidium and skidd13)
2007-11-04 23:06:39 +00:00
glx
6120d02751
(svn r11352) -Codechange: cache callback 2D result (vehicle color mapping) instead calling it every time the vehicle is drawn
2007-10-28 15:40:18 +00:00
maedhros
5712da734f
(svn r11333) -Fix: Train engines still had a value of 0.
2007-10-21 16:52:01 +00:00
rubidium
b4e7203b0a
(svn r11332) -Fix: vehicles getting a value of 0 on construction.
...
-Fix: assertion when selling vehicles.
2007-10-21 16:45:00 +00:00
rubidium
c8df832678
(svn r11230) -Fix [FS#1228]: one could construct trains out of crashed wagons and engines. Based on a patch by SmatZ.
2007-10-08 20:16:25 +00:00
rubidium
2e8f93a821
(svn r11229) -Fix [FS#1307]: one could sell vehicles that were crashed in a depot, which would still yield money.
2007-10-08 20:06:37 +00:00
rubidium
a28b307c95
(svn r11173) -Codechange: rename some callback enums so they are more uniform.
2007-09-26 17:33:32 +00:00
rubidium
26310769dd
(svn r11134) -Fix [FS#1238]: vehicles got removed twice from the group list when selling whole trains.
2007-09-21 17:56:55 +00:00
rubidium
f41c8ab3aa
(svn r11122) -Fix [FS#1234]: crash when building a NewGRF vehicle when the articulated build vehicle callback returneed a different value for the purchase window than the normal build. Thanks for Dalestan and _minime_ for pointers to possible causes.
2007-09-17 04:23:03 +00:00
rubidium
a18f3f25a9
(svn r11120) -Codechange: remove the arbitrary limit of 10 articulated parts for a vehicle.
2007-09-16 20:48:00 +00:00
rubidium
d651f6b9ed
(svn r11086) -Fix/Revert (r11053, r10984): "fixing" r11053 made the acceleration code use the wrong speed, which can be fixed by reverting a small piece of r10984.
2007-09-10 17:13:37 +00:00
rubidium
634aba16a7
(svn r11072) -Fix [FS#1045]: when a vehicle had a service order, the goto-depot button did not make it possible to stop the vehicle at that depot.
2007-09-09 17:42:59 +00:00
rubidium
c97804461e
(svn r11059) -Fix [FS#1182]: inconsistency between Rail<->ElRail conversions of different kinds of rail containing tiles (normal rail, stations, depots, etc). Patch by SmatZ.
2007-09-08 09:52:02 +00:00
rubidium
0db524e175
(svn r11048) -Fix [FS#1206]: several cases where (re)moving eninges on a train would corrupt the vehicle counts for the groups.
2007-09-05 21:05:12 +00:00
bjarni
7cd2aeb1c9
(svn r11045) -Codechange: added a function to tell if a vehicle is the rear part of a dualheaded train engine
2007-09-05 10:15:23 +00:00
rubidium
cadc470da5
(svn r11017) -Codechange: unify determining whether a vehicle needs/can be service a little more.
2007-08-31 17:13:39 +00:00
rubidium
732845440a
(svn r11011) -Fix [FS#1129]: GetFirstVehicleInChain did change the game state while being marked const.
...
-Codechange: do not brute force determine the first vehicle in the chain or previous vehicle, but do it by properly accounting the previous and first pointers when updating the next pointer. This gives a performance increase of about 15% when there are a lot of vehicles in the game.
2007-08-30 21:11:12 +00:00
rubidium
f830699971
(svn r11004) -Codechange: some reworks of the saveload mechanism to be able to save and load private and protected variables in the vehicle struct.
2007-08-30 13:09:44 +00:00
rubidium
235ad4ab6b
(svn r11003) -Codechange: replace Vehicle->next to Vehicle->Next() and Vehicle->SetNext() so we can trap instances that change a next pointer and (in the future) update the first/previous pointers based on that.
2007-08-30 13:03:56 +00:00
rubidium
dc80195754
(svn r10999) -Codechange: unify the way the running cost of a vehicle is determined. Patch by nycom.
2007-08-29 21:27:16 +00:00
rubidium
a6a9968d16
(svn r10997) -Codechange: unify the vehicle view window. Patch by PhilSophus.
2007-08-29 20:50:58 +00:00
rubidium
91d18ebd17
(svn r10984) -Codechange: unify the way one can get the current speed in the same forwat so we can display it.
2007-08-26 20:43:22 +00:00
rubidium
39f17c9de4
(svn r10983) -Codechange: use vehstatus & VS_CRASHED instead of some other "methods" custom to each vehicle to determine whether the vehicle is crashed.
2007-08-26 20:16:02 +00:00
bjarni
495bc4ecf4
(svn r10823) -Fix r8610 [FS#1097]: the autoreplace window vehicle count didn't always update correctly) (Matthias)
2007-08-07 23:07:10 +00:00
rubidium
b21f29c38f
(svn r10770) -Codechange: use the pool item class as super class for the vehicle struct.
...
-Codechange: do not force "special" vehicles to be allocated in the low 1024 vehicle slots and non "special" vehicles in the rest of the slots.
2007-08-03 19:36:00 +00:00
peter1138
9b9bca40b9
(svn r10734) -Fix [FS#1030]: Revert r10513) and add special cases for collision detection on bridges/tunnels.
2007-07-30 08:49:41 +00:00
rubidium
a67957866a
(svn r10697) -Codechange: give a more sensible names to some of the unkX variables.
2007-07-26 15:37:19 +00:00
rubidium
df009178d4
(svn r10587) -Codechange: move the string/dparam related stuff from variables.h to strings.h
2007-07-16 09:16:58 +00:00
rubidium
7cb7488836
(svn r10493) -Codechange: update some callback ID enums to reflect their changed usage, add a few and update the comments.
2007-07-09 19:38:12 +00:00
rubidium
4b70a97fde
(svn r10474) -Fix [FS#995]: wrong group count after train crash.
2007-07-08 09:29:28 +00:00
rubidium
ec137f60ed
(svn r10409) -Codechange: replace (Aircraft|RoadVeh|Ship|Train)_Tick with a Tick method in the Vehicle class.
2007-07-01 19:24:54 +00:00
rubidium
c0e341ee05
(svn r10408) -Codechange: make GetImage a class method of Vehicle instead of Get(Aircraft|RoadVeh|Ship|Train)Image.
2007-07-01 19:11:47 +00:00
rubidium
5c1aff5ce6
(svn r10381) -Fix [FS#951]: skipping an order made train reverse immediatelly. Patch by boekabart.
2007-06-28 22:03:34 +00:00
peter1138
85fb4eb94b
(svn r10363) -Fix [FS#911]: invalidating autoreplace windows didn't take account of vehicle group (Matthias Wolf)
2007-06-27 20:40:20 +00:00
peter1138
f8a5b61f4e
(svn r10344) -Fix (r10317): confusion between TRACK_n and TRACK_BIT_n stopped NW/SE slopes being picked up, and compare middle of tile against current z, not previous.
2007-06-26 20:03:17 +00:00
maedhros
9fce70ac21
(svn r10335) -Fix (r10331): Increment the current order index *after* using it in UpdateVehicleTimetable.
2007-06-25 23:14:13 +00:00
rubidium
e68892dcd4
(svn r10317) -Fix [FS#786]: acceleration not calculated properly when a train goes up a hill between tunnels.
2007-06-25 08:24:03 +00:00
truelight
872ba4e659
(svn r10288) -Fix [FS#202]: also age engines that aren't front-engines (based on a patch by kaan)
2007-06-22 22:42:18 +00:00
rubidium
37e3cbb980
(svn r10287) -Fix (r10266): some surprises from that (almost always) complaining compiler...
2007-06-22 22:28:15 +00:00
rubidium
fc201d4ad8
(svn r10266) -Codechange: keep track of the origin, time of travel and accumulated feeder share (transfers) of individual pieces of cargo. This means that cargo isn't thrown on a big pile when it's put in a station or unloaded at a station, however the GUI does not reflect these changes yet so you will not actually see it.
2007-06-22 11:58:59 +00:00
rubidium
d0fa4eb9de
(svn r10258) -Codechange: as we are now using int64 all over the place, it's better to use int64 variables in the string generating too instead of packing them into two int32s.
...
-Fix: some displays of money were wrong.
2007-06-21 17:25:17 +00:00
rubidium
1b27095c83
(svn r10247) -Fix (r10210): *always* call SetDParamMoney when you want to place money in some string.
2007-06-21 14:54:51 +00:00
rubidium
0d8e82b7d7
(svn r10246) -Fix (r10297): some forgotten money conversions and truncation issues. Thanks to benc for providing the patch.
2007-06-21 14:32:27 +00:00
maedhros
7fb6e8f11d
(svn r10236) -Feature: Introduce a form of timetabling for vehicles.
2007-06-20 19:17:22 +00:00
peter1138
195ef32835
(svn r10222) -Fix [FS#892]: Only 2 trains could crash at one time as collision checking stopped on the first hit. This could cause desyncs in network games as the collision hash order is not guaranteed. (patch by B. N. Smatz)
2007-06-19 16:40:59 +00:00
rubidium
23727da96f
(svn r10208) -Codechange: replace int32 with Money where appropriate.
2007-06-18 21:44:47 +00:00
rubidium
773a7c9cb6
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
2007-06-18 19:53:50 +00:00
rubidium
3ccc83e640
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
2007-06-18 10:48:15 +00:00
peter1138
70b6716b98
(svn r10177) -Fix: Passengers has one A and two Es (ln)
2007-06-17 10:47:30 +00:00
peter1138
ce590b59f3
(svn r10111) -Codechange: Add new vehicle hash table for collision detection and finding vehicles on a tile. The hash area scanned is far smaller than the old hash table, which is now used for viewport updates only. This should give a significant performance improvement for games with many vehicles. (Based on work by 'B. N. SmatZ!' and 'madman2003')
2007-06-12 11:22:32 +00:00
maedhros
c186f91cbd
(svn r10097) -Feature: Add support for articulated road vehicles, or callbacks 11 and 17 for
...
road vehicles for those who prefer the technical explanation.
2007-06-11 14:00:16 +00:00
peter1138
2900732931
(svn r10028) -Fix (r2270/r2951): When deleting the first engine of a train with multiple engines, only reopen the train window if the player had the original train window open. This fixes 'random' windows opening for multiple players of the same company.
2007-06-02 20:08:23 +00:00
bjarni
9f13fc2cf5
(svn r10026) -Fix: unlinking a rail vehicle didn't clear the first pointer
...
After r9973, this could cause some asserts as some vehicles could end up with first pointers to chains they didn't belong to
2007-06-02 17:23:31 +00:00
maedhros
6777662286
(svn r10023) -Fix (r3218): When selling trains, if there were no wagons between multiheaded
...
engines the rear part could be checked despite having already been deleted,
triggering an assert.
2007-06-02 14:42:25 +00:00
maedhros
19250f91b0
(svn r10022) -Fix (r10007): Set the type of multiheaded trains before the subtype.
2007-06-02 11:15:38 +00:00
maedhros
2181e11c18
(svn r10008) -Codechange: Move a couple of functions related to articulated vehicles to a file of their own.
2007-06-01 11:41:02 +00:00
maedhros
abdffa410d
(svn r10007) -Codechange: Add some asserts to IsFrontEngine and friends to ensure that only trains use them.
2007-06-01 11:17:30 +00:00
rubidium
fc9df2c336
(svn r9987) -Fix [FS#818]: a train under a bridge could collide with a train on the bridge.
2007-05-30 13:27:56 +00:00
bjarni
8aaa258122
(svn r9973) -Cleanup: removed some code that kept both ends of a dualheaded engine in the same train (when moving wagons in a depot)
...
NormaliseTrainConsist() is called later in the same command and it will take care of this issue
2007-05-29 10:35:52 +00:00
bjarni
bcb668c2ff
(svn r9967) -Fix (r9938): autoreplace would in certain conditions move dualheaded engines in a train (usually to the rear)
...
-Change: moving an engine in between the two ends of a dualheaded engine will now move the rear dualheaded engine to the front of the newly added engine (instead of moving the new engine to the rear of the rear dualheaded engine)
This can make a difference if there are wagons in the train
2007-05-28 21:40:40 +00:00
rubidium
821e58ac95
(svn r9914) -Codechange: prepare GTTS and the pathfinders to handle multiple road types on a single tile.
2007-05-24 22:41:50 +00:00
peter1138
da204ca17f
(svn r9875) -Fix (r9828): Only set carriage capacity if the wagon has not been refitted.
2007-05-19 10:29:51 +00:00
rubidium
8f0f090c51
(svn r9874) -Feature: advanced vehicle lists a.k.a. group interface. Now you can make groups of vehicles and perform all kinds of tasks on that given group. Original code by nycom and graphics by skidd13.
2007-05-19 09:40:18 +00:00
peter1138
e16ea9b758
(svn r9828) -Codechange: [NewGRF] Add support for changing cargo capacity with callback 36. This is set on construction for ships and roadvehicles, and whenever carriages are attached for trains.
2007-05-12 07:05:34 +00:00
peter1138
fe5830c4b7
(svn r9818) -Codechange: Cache wagon override sprite set whenever consist is changed, instead of 'recalculating' it every time it is used or just tested.
2007-05-10 06:42:43 +00:00
rubidium
a84ca16dc4
(svn r9808) -Codechange: unify the Handle<VehicleType>Loading functions.
2007-05-07 16:21:34 +00:00
rubidium
2813b4440b
(svn r9807) -Codechange: unify playing of sound when vehicle has been loaded and leaves the station.
2007-05-07 15:58:05 +00:00
peter1138
ebe81b98ce
(svn r9806) -Codechange: [NewGRF] Add callback 36 support for purchase cost, for all vehicle types.
2007-05-07 13:26:10 +00:00
rubidium
eecf806cfc
(svn r9802) -Fix: a vehicle without visual effects isn't per definition unpowered (mart3p).
2007-05-06 20:00:36 +00:00
rubidium
6c967ddbfd
(svn r9801) -Fix: do not assume that trains running on monorail/maglev cannot smoke/spark (mart3p).
2007-05-06 19:58:34 +00:00
rubidium
969366354d
(svn r9800) -Codechange: play sound effects based on the engine class, not the rail type (mart3p).
2007-05-06 19:51:25 +00:00
rubidium
9a893ebe20
(svn r9794) -Codechange: refactor the question whether a vehicle can be loaded into LoadUnloadVehicle instead of duplicating it for each vehicle.
2007-05-06 14:59:01 +00:00
rubidium
bc1901a6e4
(svn r9784) -Codechange: remove unused variable.
2007-05-04 22:38:36 +00:00
peter1138
93793eb89a
(svn r9780) -Codechange: [NewGRF] Add support for variable vehicle weight for trains (callback 36, property 16)
2007-05-04 19:24:01 +00:00
rubidium
cc9d811f53
(svn r9770) -Codechange: perform the payment of cargo when loading/unloading, but when arriving at the station.
2007-05-02 18:29:11 +00:00
rubidium
5a46c763f0
(svn r9760) -Codechange: remove the need for saving some vehicle variables.
2007-05-01 16:35:14 +00:00
rubidium
84c27fc773
(svn r9756) -Fix [FS#755]: LeaveStation wasn't always called when a station was left.
2007-04-29 22:51:12 +00:00
rubidium
df59f5cd15
(svn r9755) -Codechange: refactor some more of the begin loading stuff.
2007-04-29 22:33:51 +00:00
rubidium
0def47a3b0
(svn r9754) -Codechange: make classes for all vehicle types, so we can make nicer/better maintainable code, i.e. virtual methods instead of switches.
2007-04-29 21:24:08 +00:00
rubidium
dba21ab802
(svn r9752) -Codechange: remove some duplication related to BeginLoading.
2007-04-29 18:21:24 +00:00
maedhros
8acc58b731
(svn r9742) -Fix (r9689) [FS#739]: Fix cloning with refit costs again, hopefully for good this time.
2007-04-29 08:43:00 +00:00
maedhros
aaa917d56d
(svn r9685) -Fix (r9683): Call v->LeaveStation() when a vehicle in a station is sent to a depot.
2007-04-20 11:39:01 +00:00
rubidium
7577954ced
(svn r9672) -Cleanup: lots of coding style fixes around operands.
2007-04-18 22:10:36 +00:00
peter1138
0d32783f87
(svn r9671) -Codechange: Implement NewGRF callback 36, which allows changing of various properties which were previously static. Vehicle max speed and train power/te/running costs are adjustable.
2007-04-18 18:37:40 +00:00
belugas
0eaa72e324
(svn r9665) -Documentation: Doxygen corrections,errors, corrections of corrections...
2007-04-18 00:41:09 +00:00
maedhros
3d81de8d7e
(svn r9609) -Codechange: Move some function prototypes out of functions.h and into landscape.h, and add a few where they didn't exist.
2007-04-12 13:07:15 +00:00
belugas
4c4f2a34ef
(svn r9558) -Documentation: doxygen and comment changes: 'T' now. Almost done
2007-04-04 03:21:14 +00:00
maedhros
00d828e738
(svn r9543) -Fix [FS#691]: Split up STR_ENGINE_NOT_BUILDABLE into four strings so it can be
...
translated properly and remove "buildable", since it isn't actually a word.
2007-04-02 11:35:08 +00:00
belugas
691f8578fd
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
2007-03-22 03:42:43 +00:00
peter1138
5a2236dd84
(svn r9322) -Codechange: Use cargo class to count crash/flood victims
2007-03-19 12:40:51 +00:00
rubidium
b63634f095
(svn r9277) -Fix [FS#685]: shared orders got messed up when the 'first' trains got removed in the depot.
2007-03-18 15:32:42 +00:00
peter1138
70e32d663a
(svn r9259) -Codechange: NUM_CARGO isn't a valid cargo type...
2007-03-16 21:42:11 +00:00
KUDr
8a58bb5108
(svn r9146) -Fix [NTP][FS#676](r6800): "Train is lost" message is generated incorrectly. Forgot to set the best bird distance to zero in case we found the destination to indicate success. (de_zeurkous)
2007-03-13 21:04:22 +00:00
bjarni
0ad237611e
(svn r9072) -Codechange: [Orders] added methods to orders to free them and check if they are in use
2007-03-08 21:39:34 +00:00
rubidium
36cea84b11
(svn r9068) -Codechange: capitalize the VEH_Train etc. enums to match the coding style (and rest of the code).
2007-03-08 16:27:54 +00:00
rubidium
979ccd45ba
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
2007-03-07 12:11:48 +00:00
rubidium
4169bfba06
(svn r9050) -Codechange: Foo(void) -> Foo()
2007-03-07 11:47:46 +00:00
maedhros
78c3edcbb1
(svn r8946) -Feature: [NewGRF] Add support for vehicle variables 0xFE and 0xFF bit 10,
...
which is set when a vehicle was built during the exclusive testing phase.
2007-02-28 17:59:05 +00:00
maedhros
2f557f7dc0
(svn r8945) -Codechange: Rename v->load_status to v->vehicle_flags so it can be used for more than just the gradual loading status.
2007-02-28 17:18:36 +00:00
rubidium
b5a997a446
(svn r8935) -Codechange: unification of track type between road and rail tiles, unification of ground type between normal rail tiles and depots/waypoints and removing the need for RailTileSubType.
2007-02-27 23:36:28 +00:00
tron
742f5d80b5
(svn r8900) -Fix
...
Get rid of DECLARE_ENUM_AS_BIT_INDEX(Track, TrackBits)
2007-02-25 11:49:43 +00:00
tron
c0ec367e9b
(svn r8899) -Fix
...
Remove the unused second parameter from GetTileRailType()
2007-02-25 11:36:19 +00:00
tron
05c6e8f883
(svn r8897) -Fix
...
Change the signature of GetNewVehiclePos():
-void GetNewVehiclePos(const Vehicle *v, GetNewVehiclePosResult *gp);
+GetNewVehiclePosResult GetNewVehiclePos(const Vehicle *v);
2007-02-25 10:49:13 +00:00
tron
270e366772
(svn r8896) -Fix
...
Most (i.e. 13 of 15) callers of GetNewVehiclePos() do not care for the return and the others can figure it out by inspecting the information returned in struct GetNewVehiclePosResult.
Therefore remove the return value.
2007-02-25 10:25:25 +00:00
tron
5d081ed350
(svn r8894) -Fix
...
Slightly simplify the control flow of TrainController()
2007-02-25 09:47:46 +00:00
tron
c8e85a3a78
(svn r8893) -Fix
...
variable scope, const, misc.
2007-02-25 09:27:03 +00:00
tron
5c91ec0587
(svn r8884) -Fix
...
Replace SetSpeedLimitOnBridge() by something simpler
2007-02-24 18:44:30 +00:00
tron
a64ffc1e31
(svn r8878) -Fix
...
-Fix: Do a better job when checking the parameters of CmdMoveRailVehicle()
NOTE: 0.5 candidate
2007-02-24 14:36:14 +00:00
peter1138
59cb258578
(svn r8850) -Codechange: Use the cargo type's is_freight flag instead of checking the cargo type to determine if the cargo type is freight cargo type cargo type.
2007-02-22 22:53:49 +00:00
peter1138
3d581f4f89
(svn r8826) -Codechange: Replace _cargoc's separate arrays with a regular struct array (with accessor) and implement new initialization method using cargo labels.
2007-02-20 22:09:21 +00:00
celestar
72e74c29d4
(svn r8709) -Fix/Codechange: Rename the function GetStationPlatforms into GetPlatformLength because that is what it really does. Overload it because there is already a GetPlatformLength (one gives the length of the whole platform, the other gives the remaining length in a given direction). Turned both functions into methods of Station. While messing around with it, fix a problem where loading times for overhanging trains are miscomputed.
2007-02-13 16:36:38 +00:00
rubidium
4d0f8bac27
(svn r8703) -Codechange/cleanup: some magic numbers -> enums and other small coding style changes to the ShipController and TrainController.
2007-02-13 11:29:20 +00:00
rubidium
0ba18a677c
(svn r8701) -Codechange: replace magic numbers with enums for u.rail.track.
2007-02-13 10:46:45 +00:00
rubidium
dba93c7038
(svn r8700) -Fix (8698): replaced a magic number with the wrong enum :(
2007-02-13 10:43:50 +00:00
rubidium
eb5648f382
(svn r8698) -Codechange: enumify the returns of VehicleEnterTile
2007-02-13 10:26:53 +00:00
bjarni
f626458af7
(svn r8610) -Codechange/Feature: rewrote the list handling in the autoreplace window
...
-The user will notice the following changes:
All vehicle types behaves in the same way
Adding/removing an engine (new design and so on) can no longer result in the window selecting a new engine
All valid replacements will be displayed since it looks at refitting options as well (this solves the missing ships with the newships GRF)
Since you can't replace an engine into itself, the engine selected in the left list will no longer appear in the right list
-The code changes:
Instead of looping all engines all the time, each list generates a list like the build windows
This ensures consistent list generation since only one function can loop all engines
Unified code for all vehicle types
It now use the lists to call the drawing code in the build vehicle window
Works on selected EngineIDs instead of selected index in the list
2007-02-06 11:11:12 +00:00
tron
cf5514ce8d
(svn r8550) -Fix
...
Building a vehicle does not involve allocating orders, so do not check whether orders could be allocated
2007-02-03 09:05:43 +00:00
belugas
e8af755d7f
(svn r8455) -Codechange: Give a more meaningful name (railveh_type)to member flags of RailVehInfo, as well as changing the code to reflect the fact that it was not a flag but rather a one value only variable. Doing so, some evaluations have been simplified.
...
-Codechange: Add and use RAILVEH_SINGLEHEAD when railveh_type is set to 0, which was implicit before.
-Cleanup: Remove some extraneous parenthesis.
2007-01-30 11:53:35 +00:00
peter1138
45654f8be0
(svn r8434) -Fix (r8430): Missing braces caused compilation failure for some (most?) compilers...
2007-01-27 22:28:28 +00:00
tron
9ccb6ddd71
(svn r8430) -Fix
...
Replace the rather obscure control flow for handling aircraft/ship/train orders by something remotly comprehensible (see r3584)
2007-01-27 16:45:16 +00:00
tron
fdee057baf
(svn r8393) -Fix
...
-Codechange: CheckCompatibleRail() is only called for tiles which are known to contain a piece of rail. Simplify the function accordingly by eliminating unnecessary checks.
-Fix (?): Also fix an inconsistency in deciding what a compatible rail type is between level crossings and other rail tiles. It is unknown if this caused any problems.
2007-01-24 18:03:36 +00:00
tron
7fffe8b3d4
(svn r8385) -Fix
...
-Regression (r8314): I only did half the necessary changes to move railtype from Engine to RailVehicleInfo. Now do the rest.
2007-01-24 07:14:09 +00:00
tron
5438336102
(svn r8320) -Fix
...
Simplify TrainPowerChanged() somewhat by eleminating code duplication
2007-01-21 18:46:19 +00:00
tron
81e88a2a7c
(svn r8276) -Fix
...
Change the signature of Swap() to be less error prone, i.e. pass the variables to be swapped by reference instead of passing pointers to the variables.
Just do Swap(x, y) instead of Swap(&x, &y). This prevents accidents when the variables are pointers.
2007-01-19 11:47:48 +00:00
peter1138
ca9843424b
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
...
This lets us increase the sprite width from 14 to up to 29 bits,
effectively nulling the old sprite limit. Table changes in next commit.
2007-01-14 19:57:49 +00:00
KUDr
92e42d621d
(svn r8110) -Codechange: direct Vehicle::current_order.type changes (to OT_LOADING and OT_LEAVESTATION) replaced by v->BeginLoading() and v->LeaveStation() calls. This should allow easy hooking of those state transitions in order to maintain vehicle loading queue.
2007-01-13 18:55:54 +00:00
celestar
c56ee62ade
(svn r8056) -Codechange: Remove swap_byte, swap_byte, and siblings (some were not used anyway) and replace them by our SwapT implementation
2007-01-11 12:32:10 +00:00
celestar
08de6b082a
(svn r8055) -Codechange: Replace the different max, dmax, maxu whatever macros by a simple template function max(), that requires two arguments of the same type. While I'm at it change a variable called "max" to "maxval" in a function that calls max().
2007-01-11 11:05:01 +00:00
rubidium
a7d0cdf95f
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
2007-01-10 18:56:51 +00:00
KUDr
07c30785ab
(svn r8033) [cpp] - Prepare for merge from branches/cpp (all .c files renamed to .cpp)
2007-01-10 18:12:09 +00:00