Commit Graph

40 Commits (a7d8ad0004e00e1d917d636f4d69fd58f5edbfa3)

Author SHA1 Message Date
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. 18 years ago
Darkvater d7b34a1d4c (svn r4132) - Missed 3 CargoID's 18 years ago
Darkvater d5909f901a (svn r4128) - CodeChange: Add proper semantics for CargoID for such variables instead of using the general byte-type. 18 years ago
tron cda8934a55 (svn r4120) Use the new station functions where appropriate 18 years ago
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 18 years ago
tron 9be713f1ae (svn r4079) Add GetSation{Index,ByTile}() to get the station index resp. the station from a tile 18 years ago
tron 4b74fa1923 (svn r3981) More work for the rail accessing functions and enums 18 years ago
tron b8da06ddb1 (svn r3907) Replace many bridge related direct map accesses with calls to shiny new functions and mark some strange constructs with XXX 19 years ago
tron 3d9c76d8b8 (svn r3887) Add a function to get the other bridge end when you're at a bridge ramp 19 years ago
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]
19 years ago
tron 12d252d9bd (svn r3831) Add and use GetRailDepotDirection() 19 years ago
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 19 years ago
tron 929fae7b68 (svn r3816) Use existing accessors 19 years ago
tron 2d3c28f2b3 (svn r3776) Replace many ints and magic numbers by Direction, DiagDirection and friends 19 years ago
tron cc4f5b4e6f (svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme 19 years ago
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.
19 years ago
tron 6a74cb2787 (svn r3660) Convert further road bits and type references to the functions/enums 19 years ago
tron b13ac1486c (svn r3614) turn 2 do-while-loop with 2 induction variables each into canocical for loops 19 years ago
tron 49c7eb934b (svn r3613) Some more const, indentation, whitespace and similar stuff 19 years ago
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. 19 years ago
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
19 years ago
tron 84fb96fe85 (svn r3511) More whitespace ([FS#46] by Rubidium) 19 years ago
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
19 years ago
tron bf98086de8 (svn r3298) Remove unused and write-only variables 19 years ago
peter1138 809b03c81a (svn r3282) - Codechange: Replace tests against CMD_ERROR with CmdFailed() 19 years ago
truelight 6a4ba84320 (svn r3226) -Fix: GPMI implementation had minor glitches
-Fix: the AI speed control is done by the AI-core, individual AIs don't have to do it (so, AIs were delayed twice ;)
-Add: Support for AI-network-clients (an AI, connecting to a remote server)
-Fix: minor AI-core problems
19 years ago
tron 3bf8d2ccbb (svn r3190) Turn some loops into canonical for loop form 19 years ago
tron b9729fb72e (svn r3185) const 19 years ago
tron f7abff5f96 (svn r3181) -Bracing
-Indentation
-Whitespace
-DeMorgan's Law
-Test with NULL or 0 for non-booleans
-'\0' instead of 0 for chars
-Remove redundantly redundant comments (like DoFoo(); // Do foo)
-Join multiple short lines with a single statement
-Split single lines with multiple statements
-Avoid assignments in if
19 years ago
tron 833032adc0 (svn r3177) GB, CLRBIT, HASBIT, TOGGLEBIT 19 years ago
tron ee15e3de13 (svn r3172) static, const 19 years ago
tron e0dd7efc82 (svn r3080) byte -> PlayerID, int -> EngineID, -1 -> INVALID_ENGINE 19 years ago
tron 2b91f55b32 (svn r3073) int/byte -> EngineID/PlayerID/VehicleID
0/-1 -> INVALID_ENGINE
0x10 -> OWNER_NONE
19 years ago
tron d4752ba0da (svn r3058) The default AI may not build dual headed trains under certain circumstances.
Simplify this check by testing the rail vehicle info flags instead of passing a global variable around.
Note: This is not exactly the original behaviour, because the Lev4 was always allowed to be built, but i guess that was a glitch.
19 years ago
tron 9314ea877f (svn r3052) Fix last commit *grml* 19 years ago
tron 0834a88a12 (svn r3051) Remove the unused function RemoteSubsidyAdd() 19 years ago
tron 313fcfbd83 (svn r2973) Move a function declaration somewhere where it belongs 19 years ago
Darkvater 2131f68ae2 (svn r2951) - Fix: [ 1259345 ] Changing engine in netgame opens train window for everyone
- Add IsLocalPlayer() which substitutes _local_player == _current_player
19 years ago
Darkvater 236abb6a6c (svn r2949) The AI no longer needs to 'cheat' to build aircraft; eg it builds them now from a hangar. Also, to query the price of a new aircraft tile information is not needed 19 years ago
truelight d05f504c01 (svn r2907) -Codechange: splitted the AIs to their own directory. AINew becomes 'trolly', AIOld becomes 'default', both in their own dir in the 'ai' dir. More AIs to come. 19 years ago