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.
19 years ago
tron
9b89d3b8cd
(svn r5096) Avoid unnecessary copying of _cmd_text
19 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
19 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
Darkvater
8faf1838e6
(svn r4623) - Codechange: s/byte/PlayerID/
19 years ago
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()
19 years ago
tron
e272b03fee
(svn r3365) Staticise 36 functions
19 years ago
tron
b06b3e2ca2
(svn r3313) Remove GPMI related changes from trunk
...
Revisions in detail: 2542, 3226 (partial), 3229, 3231, 3232, 3238, 3242-3245, 3251, 3253, 3260, 3263, 3265, 3266, 3269, 3277, 3278, 3279, 3283 (partial), 3304, 3305, 3306
19 years ago
truelight
6884453b66
(svn r3306) -Fix: forgot sometimes to switch to the right current_player for AIs
19 years ago
truelight
531073bea0
(svn r3305) -Rename: Changed all instances of ottd_ related to the AI to ttai_
19 years ago
truelight
f94da63a8d
(svn r3304) -Add: allow AI-events to see the UID of the command
...
-Fix: improved the logic of the UID code for AIs
19 years ago
tron
23bfc03054
(svn r3297) Staticise
19 years ago
truelight
be65f908c8
(svn r3285) -Codechange: Tron was confused by a name, so let's make him happy,
...
prefixed it with 'tmp', so now we know it is a temp char* :)
19 years ago
truelight
0de260182b
(svn r3284) -Fix: DoCommand always cleans up _cmd_text (tnx to Tron)
19 years ago
truelight
ba7cc8e190
(svn r3283) -Fix: decode_parameters was still used, while _cmd_text is the way
...
-Fix: _cmd_text is cleared after a command, so we need to store it
temporaray in order to first test the command, before executing
19 years ago
truelight
b6ca90e021
(svn r3279) -Fix: do not try to execute something that is not set to execute
...
-Fix: do not increase an uid number if it isn't returned
19 years ago
truelight
c872ac4eb4
(svn r3278) -Fix: lets update the tail-pointer if we add a new item, else the linkedlist never grows ;)
19 years ago
truelight
e9e1c4de53
(svn r3277) -Fix: lets use the right DoCommand for testing a build (tnx to Igor2Code)
19 years ago
bjarni
05fbf0ada5
(svn r3272) -Fix: [AI] fixed issue in AI that prevented compilation without network support
19 years ago
truelight
54cb542e1d
(svn r3269) -Fix: return CMD_ERROR instead of -1 if AI_DoCommandChecked fails
19 years ago
truelight
0f2a0df165
(svn r3260) -Add: add events for AIs to check if a command execution failed or succeeded
19 years ago
truelight
ea9cb3ee5b
(svn r3251) -Fix: report errors from GPMI in a more detailed way (Igor2Code)
19 years ago
truelight
480b1575fe
(svn r3250) -Fix: AIs weren't uninitialized when a new game was loaded
19 years ago
truelight
44c70c24d3
(svn r3246) -Fix: small glitch in ai_network_client code (network_client.c)
...
-Fix: make sure this glitch can never happen again (ai.c)
19 years ago
truelight
c963c59b67
(svn r3245) -Add: allow OpenTTD to give his GPMI-params to the GPMI modules
19 years ago
truelight
2eb1c8a215
(svn r3244) -Fix: [GPMI] Even more GPMI based AI-code cleanup, bug fixes, and you can now control the AI that is going to boot
19 years ago
truelight
9a381f4d5d
(svn r3238) -Fix: always save if you want GPMI-based AIs, this on request by
...
Darkvater, so we can, in the future, save patch options in savegames
without any problems.
19 years ago
truelight
8733f49e88
(svn r3232) -Add: implemented the event-system for AIs
...
-Add: added several hooks (event-callbacks) for road-related-stuff
19 years ago
truelight
4927236912
(svn r3229) -Add: add more GPMI support. Now GPMI-based AIs can be loaded (doesn't change a thing if you didn't enable GPMI)
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
truelight
31f218fdf9
(svn r3224) -Add: Allow the NewAI to work in Multiplayer Games (switchable via patch
...
settings, off by defaut). An other step to AIScripts.
WARNING: this is still highly experimental and has known bugs!
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
e0dd7efc82
(svn r3080) byte -> PlayerID, int -> EngineID, -1 -> INVALID_ENGINE
19 years ago
tron
2cc2154ad2
(svn r3077) static, const, bracing, indentation, 0 -> '\0'/NULL, typos in comments, excess empty lines, minor other changes
...
nothing spectacular, just some stuff, which piled up
19 years ago
tron
313fcfbd83
(svn r2973) Move a function declaration somewhere where it belongs
19 years ago
tron
afcb9f0d60
(svn r2972) Fix the speed of the AI
19 years ago
truelight
2e87864d0b
(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of special
...
abilities you really don't want to know about (free bridges, etc..)
I removed this flag some revisions ago, but the Aircraft part
depends on it, so I re-enabled it again..
19 years ago
truelight
991d5c6234
(svn r2921) -Codechange: moved all AI-code to 1 central place (ai/ai.c)
...
-Fix: removed the ability for the oldAI to cheat (this will criple him somewhat)
-Add: base-code for many improvements to come in the AI-system
-Add: added base-code for multiplayer AIs (DOES NOT WORK YET!)
19 years ago