celestar
091cc1cc4b
(svn r7575) -Codechange: Allow the AI to build signals under bridges (revert r4911)
18 years ago
celestar
d95e2c2dd1
(svn r7573) -Merged the bridge branch. Allows to build bridges of arbitrary rail/road combinations (including signals)
18 years ago
Darkvater
073e0eb3c9
(svn r7565) -Codechange: Rework DEBUG functionality. Look for appropiate debugging levels to
...
use in debug.h. grfmsg() is now used as a specific debug-function for grf.
18 years ago
Darkvater
dd42d07d2a
(svn r7494) -Fix: Really disable AI's in Multiplayer if you tell it so. In loaded games with
...
AI's the setting didn't take effect, resulting in immediate desyncs.
18 years ago
matthijs
9218fc16e6
(svn r7372) - CodeChange: Rename all GetXXXArraySize() functions to GetNumXXX() and add GetMaxXXXIndex() functions. This prepares for the new pool interface.
18 years ago
peter1138
62fc499370
(svn r7074) -Fix (r7073): stupid debugs
18 years ago
peter1138
6ebac79c45
(svn r7073) -Feature: Add cargo refit support to both AIs for road vehicles
18 years ago
peter1138
7ab311cd69
(svn r7072) -Fix (r7070): Go up, not down, through the engines. And replace the comment too...
18 years ago
peter1138
6f290da200
(svn r7070) -Codechange: Make the AI choose road vehicles based on a rating (currently max speed * capacity) instead of either the cost or the index of the vheicle.
18 years ago
KUDr
fd361b104d
(svn r7069) -Fix: AI tried to build road from the back or side of road stop/depot (peter1138)
18 years ago
peter1138
8cfe4d6a67
(svn r7057) -Codechange: Remove hardcoded lists of road vehicles for each cargo type in favour of just checking the cargo type of each vehicle.
18 years ago
Darkvater
ac2b6f39b1
(svn r7048) -Cleanup: DEBUG doesn't need a newline character, use DEBUG instead of printf and the
...
verb is build/built/built not build/*/build or build/*/builded.
18 years ago
glx
993cb13c8d
(svn r7020) -Fix r6047: AI tries to delete stations that are 'in use' because FOR_ALL_STATIONS skips invalid stations
18 years ago
Darkvater
b2110cbaed
(svn r6780) -Codechange: Remove GPMI leftovers (-b impersonisation of AI in MP).
18 years ago
Darkvater
6b6d908308
(svn r6776) -Codechange: Use IsValidPlayer() function to determine of a PlayerID is an
...
actual playable player (< MAX_PLAYERS) or not.
18 years ago
Darkvater
dad5d5dd72
(svn r6774) -Codechange: Rename the badly named OWNER_SPECTATOR to PLAYER_SPECTATOR and
...
put it into player.h where it belongs (instead of map.h)
18 years ago
Darkvater
2dcdeb985d
(svn r6771) -Codechange: Replace two macros with functions. IS_HUMAN_PLAYER and
...
IS_INTERACTIVE_PLAYER
18 years ago
Darkvater
110fc94cb5
(svn r6752) -Codechange: Move command functions from messy functions.h into command.h
18 years ago
Darkvater
3fee255543
(svn r6407) -Fix: Check return values of DoCommand() with CmdFailed and that of DoCommandP
...
with a boolean type.
18 years ago
Darkvater
80814dbb1d
(svn r6406) -Codechange: Rename TileOffsByDir to TileOffsByDiagDir because it accepts
...
DiagDirections, and add TileOffsByDir that handles Directions.
-Codechange: Make the treeloop use TileOffsByDir().
18 years ago
tron
1c21c645ae
(svn r6353) -Codechange: Make DestinationID a typedef of uin16, which is as large as any type of destinataion (StationID, DepotID, WaypointID) it can hold
...
DestinationID being a union of these types is just hassle without benefit and cannot be handled correctly everywhere because of local lack of information
18 years ago
Darkvater
fd09bd15b2
(svn r6280) -Codechange: Use the same naming for trains as for other vehicles:
...
CMD_SEND_TRAIN_TO_DEPOT instead of CMD_TRAIN_GOTO_DEPOT
18 years ago
rubidium
27cee58ab8
(svn r6204) -Cleanup: replace non-indentation with spaces; like '}<TAB>else {' -> '} else {', tabs between code and comment, etc.
18 years ago
truelight
db8dfcd6e9
(svn r6142) -Codechange: added WaypointID (sorry DV, couldn't splits it anymore)
...
-Codechange: introduced DestinationID, which is in fact an union of several types
Used in Order struct, so no longer StationID is abused for all targets.
Hangars are a big exception, as they use a station-id with GOTO_DEPOT (go figure)
18 years ago
truelight
ceb523c29f
(svn r6057) -Codechange: made a function GetRandomXXX, that _always_ returns a valid XXX, unless there are none to pick from. Then NULL is returned.
18 years ago
truelight
5fd9aeb12b
(svn r6055) -Codechange: added GetXXXArraySize, which returns HighestID + 1 (or, will do that).
...
It isn't the best name, but we couldn't find any better.
This unifies the pool-system even more.
18 years ago
truelight
0461d89612
(svn r6047) -Codechange: FOR_ALL now _only_ loops valid items, and skips invalid ones
...
-Codechange: use IsValidXXX where ever possible
Note: both changes to prepare for new pool system, which needs those changes.
For every pool there are 2 ugly lines, which will be removed when done
implementing new pool system.
Based on FS#13 by blathijs, partly implemented.
18 years ago
rubidium
480af9c917
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
18 years ago
truelight
d917156820
(svn r6043) -Codechange: use wrapper if they are available
18 years ago
rubidium
e159ada7a2
(svn r5975) -Cleanup: use ORIGINAL_BASE_YEAR & ORIGINAL_MAX_YEAR where the functions really depend on the original date format.
...
-Cleanup: use DAYS_TILL_ORIGINAL_BASE_YEAR where the date variables are in the old date format and conversions are needed.
-Cleanup: replace one (forgotten) instance of uint16 with Date.
18 years ago
rubidium
243872b4fd
(svn r5887) -Cleanup: move date related functions, defines and variables to date.[ch]
...
-Cleanup: fix whitespace related coding style issues in date.[ch]
-Cleanup: make original comments doxygen compatible and remove/change outdated comments
18 years ago
tron
2b27073156
(svn r5391) Miscellaneous, mostly bracing and whitespace, nothing spectacular
18 years ago
tron
7d2efe3d84
(svn r5263) Use the flag which denotes if it's a plane or helicopter instead of magical engine numbers
18 years ago
KUDr
8316020ff3
(svn r5228) Suppress MSVC warnings about signed/unsigned comparison
18 years ago
tron
0f5453d95b
(svn r5222) Misc. smaller changes, mostly const, variable scope and replacing some magic numbers by enums
18 years ago
tron
0a72639c2d
(svn r5210) Many small changes which piled up: const, unsigned, variable scope, CSE for readability, DeMorgan, if cascades -> switch, whitespace, parentheses, bracing, misc.
18 years ago
tron
be88e269b9
(svn r5155) - Remove the bridge branch merge (revision r5070)
18 years ago
tron
5fdc69194e
(svn r5129) Accommodate the default AI for the new railtype: It used hard coded numbers instead of enums to calculate prices
18 years ago
tron
32bf3c7c1c
(svn r5128) Remove the global variable _cur_ai_player
18 years ago
tron
6b37bda997
(svn r5127) Use IsRoadVehInDepotStopped() and IsAircraftInHangarStopped()
18 years ago
tron
479317b1eb
(svn r5098) Do some manual CSE and replace a few magic numbers to improve the readability of the trolly AI
18 years ago
tron
a87004e453
(svn r5097) -Fix: The trolly AI used information from the wrong industry when calculating the amount of to be transported goods
18 years ago
tron
9b89d3b8cd
(svn r5096) Avoid unnecessary copying of _cmd_text
18 years ago
tron
a0caafeb50
(svn r5094) Remove _new_{aircraft,roadveh,ship,train,wagon}_id. _new_vehicle_id is enough.
18 years ago
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
18 years ago
tron
7dff47b7f0
(svn r5091) Remove duplicate code (same check twice)
18 years ago
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.
18 years ago
tron
58458812a4
(svn r4943) uint tile -> TileIndex tile, byte player -> PlayerID player
19 years ago
tron
965ac2c1e6
(svn r4942) if (x != NULL) free(x); -> free(x);
19 years ago
tron
5783d57ec0
(svn r4941) Replace some ints and magic numbers by proper types and enums
19 years ago