Commit Graph

297 Commits

Author SHA1 Message Date
bjarni 06156142d4 (svn r4825) - Fix [clone FS#159]: Game crashes when cloning reaches train-limit. 2006-05-11 12:42:24 +00:00
rubidium 9b1bbf72ee (svn r4788) - Codechange: RAILTYPE_{NORMAL,ELECTRIC,...} and RAIL_TYPE_{NORMAL,SIGNAL,...} have nearly the same name, rename RAIL_TYPE_* to RAIL_TILE_* of extra clarity 2006-05-09 08:17:33 +00:00
tron 5622ad4b5e (svn r4765) Add GetTileMaxZ(), which returns the height of the highest corner of a tile, and use it to simplify the code in a few places 2006-05-07 07:55:05 +00:00
tron 79935130eb (svn r4750) -Fix: Trains could enter certain sloped rail tiles under bridges with incompatible rail type 2006-05-06 14:32:16 +00:00
peter1138 36d1e4a1a1 (svn r4706) - NewGRF: add the correct default error message for the wagon attach callback. 2006-05-03 06:24:14 +00:00
peter1138 6c3cc7fd16 (svn r4703) - NewGRF: add support for callback 0x1D, "can wagon be attached". This can be used to disallow freight wagons to be placed in passenger trains, along with other uses. 2006-05-02 21:43:47 +00:00
tron 18ad0ae50e (svn r4572) Remove vehicle_leave_tile_proc
There's exactly one implemented function (unbarring a level crossing) and one place where it can be triggered (a train leaves a level crossing)
It's a bit overkill, so just handle this one case where it can happen
2006-04-25 07:32:33 +00:00
tron c1dc517dab (svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE} 2006-04-23 19:35:36 +00:00
tron 0347fb2ab6 (svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums 2006-04-23 13:48:16 +00:00
celestar a7b2ec60b3 (svn r4501) -Fix: (FS#129) When, in a train that head multiple engines in front, the _first_ of those engines is sold, all the orders are copied to the second engine (to ensure "seamless" operation). However, during this operation, it was forgotten to update the prev_shared and next_shared pointers of the new head engine AND the next_shared and prev_shared of the share partners. 2006-04-21 17:15:05 +00:00
celestar ccdf322799 (svn r4479) -Fix (FS#90) electric engines (or rather their pantographs) no longer emit sparks when engine is pulled on convrail (MeusH)
P.S. Credit for previous commit goes to the bug reporter, nycom, who submitted the fix as well.
2006-04-19 16:10:17 +00:00
Darkvater d63fad7a7b (svn r4435) - Fix: an assertion triggered when trying to remove a bridge 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-15 20:07:42 +00:00
tron 060d5143ef (svn r4412) When a vehicle is in a depot or tunnel it's always flagged as 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-14 10:48:54 +00:00
tron 81e6d68f95 (svn r4342) Change the first two parameters of commands - virtual pixel coordinates of the tile to operate on - to a TileIndex
Remove DoCommandByTile(), because now it does the same as DoCommand()
2006-04-10 07:15:58 +00:00
celestar d8215a1f59 (svn r4338) -Fix (FS#105): Bug introduced in r4290. IsLevelCrossing does NOT check the tile type, it assumes the tile type IS MP_STREET 2006-04-09 18:01:06 +00:00
celestar 07e4134ebd (svn r4290) -Fix: fixed power computation for mixed consists on level crossings (michi_cc) 2006-04-05 19:08:09 +00:00
bjarni 8b1f971c1a (svn r4226) -Fix: [elrails] it's no longer possible to build electric engines in non-electric depots
this prevents autoreplace to replace to electric engines before the line in question got catenary
2006-04-01 14:53:11 +00:00
peter1138 a6e1a1d372 (svn r4198) - NewGRF: Rename GetCallBackResult() to GetVehicleCallback(), as other types will exist later, and use separate parameters instead of bitshifting. 2006-03-31 10:14:25 +00:00
celestar a7d8ad0004 (svn r4150) -Feature: Merged elrails into trunk. Thanks to Tron for lots of code and proofreading, thanks to peter1138 for another lot of code and ideas. 2006-03-29 16:30:26 +00:00
Darkvater a91c52e169 (svn r4125) - Feature: Add a general TIC() TOC() mechanism using rdtsc or 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 21:15:09 +00:00
celestar 3770ad0637 (svn r4113) Moved all relevant map functions for stations to station_map.[ch]
Some work with animated tiles remains. Thanks to Tron for parts of the code and lots of proof-reading and suggesting
2006-03-26 14:41:39 +00:00
celestar 842eac5d7f (svn r4088) -Codechange: Introduce {Unb,B}arCrossing and IsCrossingBarred to put and get the status of a level crossing 2006-03-24 15:24:16 +00:00
tron 9be713f1ae (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 2006-03-24 08:55:08 +00:00
tron 4b74fa1923 (svn r3981) More work for the rail accessing functions and enums 2006-03-19 13:48:08 +00:00
tron 77e5cf4bc1 (svn r3979) Move GetRailFoundation() to rail_map.h and use it and friends to get information about rail tiles 2006-03-19 12:06:12 +00:00
bjarni a137268f13 (svn r3947) use TOGGLEBIT() instead of manual bit toggling in CmdReverseTrainDirection (pointed out by glx) 2006-03-18 14:35:54 +00:00
bjarni b610872f35 (svn r3945) cleaned the layout in CmdReverseTrainDirection a bit (made a bit messy in last commit) 2006-03-18 13:15:34 +00:00
bjarni a36f8a46fa (svn r3944) -Feature: it's now possible to turn a single unit in a train
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-18 13:00:32 +00:00
tron 89090790c2 (svn r3916) Get/Set the rail type by [GS]etRailType{Crossing,OnBridge,}() 2006-03-17 10:10:31 +00:00
tron b8da06ddb1 (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX 2006-03-16 15:16:27 +00:00
tron 5d939d9c10 (svn r3851) Rail depots only have an entrance at one side, therefore use UpdateSignalsOnSegment() instead of SetSignalsOnBothDir() 2006-03-13 20:12:35 +00:00
tron b05a98fdfa (svn r3832) Replace some magic numbers by (Diag)Direction enums 2006-03-12 17:42:04 +00:00
tron 12d252d9bd (svn r3831) Add and use GetRailDepotDirection() 2006-03-12 16:13:16 +00:00
tron 78083f0da7 (svn r3830) Move IsTunnelTile() from tile.h to tunnel_map.h and add IsTunnel(), which just checks for a tunnel, but not the tile type as IsTunnelTile() does 2006-03-12 15:04:03 +00:00
tron b394f72fa9 (svn r3829) Reduce the use of _error_message by directly returning error codes instead of using this global variable 2006-03-12 12:19:25 +00:00
tron 78a7b15ce0 (svn r3803) Change the second parameter of UpdateSignalsOnSegment() from Direction to DiagDirection as that's what it really operates on 2006-03-09 12:32:25 +00:00
tron e68120034c (svn r3789) Add an enum and function to handle DiagDirection changes 2006-03-08 08:51:26 +00:00
tron 2181a72e9e (svn r3787) Use DirToDiagDir() instead of >> 1 2006-03-08 08:28:48 +00:00
tron 03536a32a1 (svn r3786) More work for DirDiff 2006-03-08 08:16:31 +00:00
tron ecabf8a5f0 (svn r3784) Add a type and functions to handle direction changes 2006-03-08 07:48:56 +00:00
tron fbe939b31f (svn r3783) Replace further ints and magic numbers by Direction, DiagDirection and friends 2006-03-08 06:55:33 +00:00
tron f2dc736554 (svn r3777) Add some functions to handle tunnels 2006-03-06 20:55:24 +00:00
tron 2d3c28f2b3 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 2006-03-06 20:28:28 +00:00
tron 87fdb129d2 (svn r3758) Remove the news validation callback. It is superseded by r3757. 2006-03-04 11:15:44 +00:00
tron 4270026b42 (svn r3757) -Feature: Delete news items about vehicles, when they get stale
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-03-04 11:01:35 +00:00
peter1138 601b226f04 (svn r3602) - Move _railveh_score data to _rail_vehicle_info->ai_rank and remove global variable to return data as we can now access this directly. 2006-02-13 22:13:02 +00:00
tron ea73b46684 (svn r3597) Miscellaneous (I like that word) changes: Fix some indentation, add consts, reduce indentation level by short-circuit logic, convert if cascades to switch, whitespace, bracing, plus some minor stuff 2006-02-13 21:15:00 +00:00
peter1138 6f5f3101b6 (svn r3588) - Refit: Use only one global to return the refit capacity rather than one per vehicle type. 2006-02-11 09:24:51 +00:00
peter1138 1097ec2b62 (svn r3587) - NewGRF: Rename Callback IDs to include their "class" 2006-02-11 09:17:16 +00:00
tron f5b564bc44 (svn r3585) Similar changes to the order handlers of the other vehicle types like r3584 2006-02-10 06:33:56 +00:00