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