summaryrefslogtreecommitdiff
path: root/train_cmd.c
AgeCommit message (Collapse)Author
2006-04-15(svn r4435) - Fix: an assertion triggered when trying to remove a bridge ↵Darkvater
with the remove-tool (r4348 surfaced this). In CmdRemoveRoad tiletype was not checked for ownership. Intorudce IsLevelCrossingTile() which checks if a tile is a crossing without knowing the type. Suggested by peter1138 and Tron.
2006-04-14(svn r4412) When a vehicle is in a depot or tunnel it's always flagged as ↵tron
VS_HIDDEN. So after checking for VS_HIDDEN and the result is false there's no need to check if it's flagged as being in a depot or tunnel
2006-04-10(svn r4342) Change the first two parameters of commands - virtual pixel ↵tron
coordinates of the tile to operate on - to a TileIndex Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-09(svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT ↵celestar
check the tile type, it assumes the tile type IS MP_STREET
2006-04-05(svn r4290) -Fix: fixed power computation for mixed consists on level ↵celestar
crossings (michi_cc)
2006-04-01(svn r4226) -Fix: [elrails] it's no longer possible to build electric ↵bjarni
engines in non-electric depots this prevents autoreplace to replace to electric engines before the line in question got catenary
2006-03-31(svn r4198) - NewGRF: Rename GetCallBackResult() to GetVehicleCallback(), as ↵peter1138
other types will exist later, and use separate parameters instead of bitshifting.
2006-03-29(svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of ↵celestar
code and proofreading, thanks to peter1138 for another lot of code and ideas.
2006-03-26(svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or ↵Darkvater
something similar on non-i386 architectures to performance-tune (critical) code. Some systems are probably missing, but those can be added later.
2006-03-26(svn r4113) Moved all relevant map functions for stations to station_map.[ch]celestar
Some work with animated tiles remains. Thanks to Tron for parts of the code and lots of proof-reading and suggesting
2006-03-24(svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to ↵celestar
put and get the status of a level crossing
2006-03-24(svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the ↵tron
station from a tile
2006-03-19(svn r3981) More work for the rail accessing functions and enumstron
2006-03-19(svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to ↵tron
get information about rail tiles
2006-03-18(svn r3947) use TOGGLEBIT() instead of manual bit toggling in ↵bjarni
CmdReverseTrainDirection (pointed out by glx)
2006-03-18(svn r3945) cleaned the layout in CmdReverseTrainDirection a bit (made a bit ↵bjarni
messy in last commit)
2006-03-18(svn r3944) -Feature: it's now possible to turn a single unit in a trainbjarni
control-click on a unit in a train in a depot will make the click unit turn around this is useful if you want "normal" engines to act as dualheaded (one each way) or similar this only works on single unit units. Multiheaded and articulated engines get a red error box this is based on a quick hack peter1138 while I made it network safe and correctly handling of multible unit engines
2006-03-17(svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}()tron
2006-03-16(svn r3907) Replace many bridge related direct map accesses with calls to ↵tron
shiny new functions and mark some strange constructs with XXX
2006-03-13(svn r3851) Rail depots only have an entrance at one side, therefore use ↵tron
UpdateSignalsOnSegment() instead of SetSignalsOnBothDir()
2006-03-12(svn r3832) Replace some magic numbers by (Diag)Direction enumstron
2006-03-12(svn r3831) Add and use GetRailDepotDirection()tron
2006-03-12(svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add ↵tron
IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does
2006-03-12(svn r3829) Reduce the use of _error_message by directly returning error ↵tron
codes instead of using this global variable
2006-03-09(svn r3803) Change the second parameter of UpdateSignalsOnSegment() from ↵tron
Direction to DiagDirection as that's what it really operates on
2006-03-08(svn r3789) Add an enum and function to handle DiagDirection changestron
2006-03-08(svn r3787) Use DirToDiagDir() instead of >> 1tron
2006-03-08(svn r3786) More work for DirDifftron
2006-03-08(svn r3784) Add a type and functions to handle direction changestron
2006-03-08(svn r3783) Replace further ints and magic numbers by Direction, ↵tron
DiagDirection and friends
2006-03-06(svn r3777) Add some functions to handle tunnelstron
2006-03-06(svn r3776) Replace many ints and magic numbers by Direction, DiagDirection ↵tron
and friends
2006-03-04(svn r3758) Remove the news validation callback. It is superseded by r3757.tron
2006-03-04(svn r3757) -Feature: Delete news items about vehicles, when they get staletron
This is used to delete - all news about a vehicle, when it gets deleted - "vehicle has stopped in depot" news, when it gets started - "vehicle has invalid orders" news, when the orders get changed
2006-02-13(svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and ↵peter1138
remove global variable to return data as we can now access this directly.
2006-02-13(svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, ↵tron
add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff
2006-02-11(svn r3588) - Refit: Use only one global to return the refit capacity rather ↵peter1138
than one per vehicle type.
2006-02-11(svn r3587) - NewGRF: Rename Callback IDs to include their "class"peter1138
2006-02-10(svn r3585) Similar changes to the order handlers of the other vehicle types ↵tron
like r3584
2006-02-08(svn r3579) v->u.rail.first_engine holds an engine type, not a vehicle ↵peter1138
index, so use INVALID_ENGINE.
2006-02-07(svn r3570) - Explicitly update v->first in TrainConsistChanged() if ↵peter1138
necessary, as this is far faster than brute forcing it later.
2006-02-06(svn r3564) Several smaller changes:tron
- Don't treat non-booleans as booleans - Reduce variable scope - Bracing - Use DeMorgan's law to make conditionals easier to read - if cascade -> switch - Replace some magic numbers by symbolic names - Avoid assignments within other statements
2006-02-05(svn r3557) - NewGRF: move callback enums to a new file as more than just ↵peter1138
engines will use them
2006-02-04(svn r3535) -Feature: [autoreplace] allow autoreplacing of train wagonsbjarni
currently ALL available wagons are displayed in the right menu in the replace window however the replacement will only be done if the new wagon can be refitted to carry same cargo as the old one is currently carrying Since the standard vehicles do not have any valid wagon replacements, this feature can only be used when using newgrf sets
2006-02-03(svn r3524) - Split newgrf features from engine.[ch] into ↵peter1138
newgrf_engine.[ch], and add the new files to project files.
2006-02-01(svn r3511) More whitespace ([FS#46] by Rubidium)tron
2006-02-01(svn r3510) Fiddle with whitespace and parenthesestron
2006-01-29(svn r3484) -fix: fixed issue in last commit where loading savegame versions ↵bjarni
18 and 19 didn't init the multiheaded engine pointers
2006-01-29(svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it ↵Darkvater
in branch/pbs. This reverts revisions r3158, r3140, r3075, r2977, r2674, r2625, r2621, r2529, r2528, r2525, r2524, r2519, r2517, r2516, r2507, r2499. (in conjunction with Tron) - The only change is that the nsignalsw.grf file is kept and that existing nightlies with PBS signals get those signals converted to combo-signals.
2006-01-25(svn r3431) - Fix crash when moving vehicles around in a train depot under ↵peter1138
certain conditions.