diff options
author | truelight <truelight@openttd.org> | 2005-11-22 15:55:38 +0000 |
---|---|---|
committer | truelight <truelight@openttd.org> | 2005-11-22 15:55:38 +0000 |
commit | e4cb8ed4570f53fc26367371e8d680882f0e70e6 (patch) | |
tree | 6702beccddba7217fe3ad311ffda9285b6719e5d /ai/trolly | |
parent | 28df667ceb7fa74a1146a2bede0a908bc9dd3eb4 (diff) | |
download | openttd-e4cb8ed4570f53fc26367371e8d680882f0e70e6.tar.xz |
(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
Diffstat (limited to 'ai/trolly')
-rw-r--r-- | ai/trolly/trolly.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/ai/trolly/trolly.c b/ai/trolly/trolly.c index 21a5ee582..2ddd8fb58 100644 --- a/ai/trolly/trolly.c +++ b/ai/trolly/trolly.c @@ -44,7 +44,7 @@ static void AiNew_State_FirstTime(Player *p) assert(p->ainew.state == AI_STATE_FIRST_TIME); // We first have to init some things - if (_current_player == 1) { + if (_current_player == 1 || _ai.network_client) { ShowErrorMessage(-1, TEMP_AI_IN_PROGRESS, 0, 0); } @@ -1347,9 +1347,6 @@ static void AiNew_OnTick(Player *p) void AiNewDoGameLoop(Player *p) { - // If it is a human player, it is not an AI, so bubye! - if (IS_HUMAN_PLAYER(_current_player)) return; - if (p->ainew.state == AI_STATE_STARTUP) { // The AI just got alive! p->ainew.state = AI_STATE_FIRST_TIME; @@ -1362,29 +1359,6 @@ void AiNewDoGameLoop(Player *p) // We keep a ticker. We use it for competitor_speed p->ainew.tick++; - // See what the speed is - switch (_opt.diff.competitor_speed) { - case 0: // Very slow - if (!(p->ainew.tick&8)) return; - break; - - case 1: // Slow - if (!(p->ainew.tick&4)) return; - break; - - case 2: - if (!(p->ainew.tick&2)) return; - break; - - case 3: - if (!(p->ainew.tick&1)) return; - break; - - case 4: // Very fast - default: // Cool, a new speed setting.. ;) VERY fast ;) - break; - } - // If we come here, we can do a tick.. do so! AiNew_OnTick(p); } |