Commit Graph

103 Commits

Author SHA1 Message Date
tron a0caafeb50 (svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough. 2006-06-04 09:28:33 +00:00
tron 877c7e34a5 (svn r5092) -Fix: There was a gross race condition in the AI code which made it pretty random if the AI could give a new vehicle its orders 2006-06-04 09:10:24 +00:00
tron 7dff47b7f0 (svn r5091) Remove duplicate code (same check twice) 2006-06-04 09:04:40 +00:00
celestar 25a63ec7af (svn r5070) Merged the bridge branch
-Feature: Bridges can now be placed above:
	Any railway track combination (excluding depots and waypoints)
	Any road combination (excluding depots)
	Clear tiles (duh), including fields
	Tunnel entrances
	Bridge heads

Thanks to Tron for idea and implementation, KUDr for the yapf synchronization and many others for hours of testing

There are still a number of visual problems remaining, especially when electric railways are on or under the bridge.
DO NOT REPORT THOSE BUGS FOR THE TIME BEING please.
2006-06-02 13:05:41 +00:00
tron 58458812a4 (svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player 2006-05-21 16:18:58 +00:00
tron 965ac2c1e6 (svn r4942) if (x != NULL) free(x); -> free(x); 2006-05-21 15:27:10 +00:00
tron 5783d57ec0 (svn r4941) Replace some ints and magic numbers by proper types and enums 2006-05-21 15:19:20 +00:00
tron edb5e87e0c (svn r4918) Move the information about the size of airports from an global array into the struct which describes an airport 2006-05-20 15:13:27 +00:00
celestar 486e207ea0 (svn r4911) -Fix (FS#156): The Ai no longer attempts to build signals under bridges.
NOTE 1: Remove/revert this for the bridge branch
			   NOTE 2: Bug displays fundamental flaw in command system:
			           If two commands, where command 2 depends on command 1, have
			           to be checked, all those checks need to be manual.
			           (like in this example, first build rail then build signal.
			            BuildSignal cannot be checked without DC_EXEC as the rail
			            isn't there yet)
2006-05-19 12:08:01 +00:00
rubidium e5bd292dab (svn r4789) - Codechange: rename RoadType to RoadTileType and ROAD_{NORMAL,CROSSING,DEPOT} to ROAD_TILE_* for consistency 2006-05-09 08:25:31 +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
Darkvater 8faf1838e6 (svn r4623) - Codechange: s/byte/PlayerID/ 2006-04-29 14:31:16 +00:00
tron 8ef2c13c65 (svn r4553) int and magic numbers -> Slope and DiagDirection 2006-04-23 19:08:33 +00:00
celestar caea7f845c (svn r4502) -Cleanup: Remove code unused since rev1. (Rubidium) 2006-04-21 17:51:01 +00:00
celestar 22f82bba2e (svn r4463) -Codechange. Include vehicle.h directly instead of implicitly via station.h in a number of source files 2006-04-18 05:16:13 +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
tron 0a509a4c48 (svn r4333) Revert back to a direct map access in one case until the exact conditions for this piece of code are investigated. The IsRoad() function is causing me headaches... 2006-04-09 10:24:57 +00:00
belugas 4fdb25e65b (svn r4318) CodeChange : Remove last direct map access on ai/default/default.c 2006-04-08 01:07:32 +00:00
celestar 446493149c (svn r4215) -Codechange: Renamed *RoadStation* functions to *RoadStop* and moved them to station_map.h to keep consistency 2006-03-31 19:10:54 +00:00
orudge 0fe27c16af (svn r4204) - Get trunk compiling again on OS/2 2006-03-31 16:01:59 +00:00
celestar 8310a46351 (svn r4154) -Moved MAX_BRIDGES in bridge.h and made it an enum. This makes two drops ... 2006-03-29 19:03:47 +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 d7b34a1d4c (svn r4132) - Missed 3 CargoID's 2006-03-26 22:56:58 +00:00
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 2006-03-26 22:23:32 +00:00
tron cda8934a55 (svn r4120) Use the new station functions where appropriate 2006-03-26 19:20:15 +00:00
tron 95adeec127 (svn r4116) -Fix: The AI should send a plane into a hangar if it's not in a hangar _or_ not stopped, not when it's not in a hangar _and_ not stopped 2006-03-26 18:48:23 +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 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 3d9c76d8b8 (svn r3887) Add a function to get the other bridge end when you're at a bridge ramp 2006-03-15 16:44:50 +00:00
tron 42d1731cc1 (svn r3857) Add and use GetBridgeRampDirection()
Note: This slightly changes the behavior of GetAnyRoadBits() to only return a road piece for the start of the bridge ramp instead of a full ROAD_[XY]
2006-03-14 12:00:11 +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 929fae7b68 (svn r3816) Use existing accessors 2006-03-11 09:10:46 +00:00
peter1138 9c7f09322e (svn r3805) - [FS#62] Fix doxygen comments to refer to the correct parameter. (sulai) 2006-03-09 20:37:51 +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 2d3c28f2b3 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 2006-03-06 20:28:28 +00:00
tron cc4f5b4e6f (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 2006-03-05 10:19:33 +00:00
tron 13041aa545 (svn r3677) Remove the FindLandscapeHeightByTile()s from the default AI.
The corresponding TileInfos look like global variables at the first glance, but always get written to before reading in each function they are used in.
2006-02-27 08:08:10 +00:00
tron 6a74cb2787 (svn r3660) Convert further road bits and type references to the functions/enums 2006-02-23 12:24:19 +00:00
tron 4b46883751 (svn r3644) Don't use FindLandscapeHeightByTile() when it's overkill - often it was just a complicated way of writing GetTileSlope(tile, NULL) 2006-02-21 07:41:54 +00:00
tron b13ac1486c (svn r3614) turn 2 do-while-loop with 2 induction variables each into canocical for loops 2006-02-18 14:52:42 +00:00
tron 49c7eb934b (svn r3613) Some more const, indentation, whitespace and similar stuff 2006-02-18 14:41:24 +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 453b30e387 (svn r3564) Several smaller changes:
- 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-06 09:18:04 +00:00
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 2006-02-01 07:36:15 +00:00
Darkvater f3b0de85bf (svn r3481) - Try and fix an svn discrepancy of trolly.h #2 2006-01-29 21:38:24 +00:00
Darkvater b2fac2e99f (svn r3480) - Try and fix an svn discrepancy of trolly.h 2006-01-29 21:37:39 +00:00
Darkvater 4e09974975 (svn r3472) - [PBS] Remove from trunk. Anyone interested can still find it 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-29 18:57:26 +00:00
tron af70b49bf7 (svn r3367) Unify the 4 distinct CMD_CHANGE_{AIRCRAFT,ROADVEH,SHIP,TRAIN}_SERVICE_INT commands into one CMD_CHANGE_SERVICE_INT command.
As side effect this is a
-Fix: The default AI tried to change the service intervals of vehicles via the CMD_CHANGE_TRAIN_SERVICE_INT command - regardless of the type of the vehicle - which of course failed for non-trains
2006-01-05 21:35:54 +00:00