From 28668bc30b1a1c9867bb88ec02cbbca499d099d5 Mon Sep 17 00:00:00 2001 From: peter1138 Date: Wed, 4 Jan 2006 20:18:39 +0000 Subject: (svn r3362) Fix issue with loading old (TTD) savegames: - move call to convert from old to new train subtypes. - ensure AI is started for AI players. --- oldloader.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'oldloader.c') diff --git a/oldloader.c b/oldloader.c index e25b6b9f1..95573c307 100644 --- a/oldloader.c +++ b/oldloader.c @@ -15,6 +15,8 @@ #include "signs.h" #include "debug.h" #include "depot.h" +#include "network.h" +#include "ai/ai.h" enum { HEADER_SIZE = 49, @@ -1065,6 +1067,9 @@ static bool LoadOldPlayer(LoadgameState *ls, int num) * to some harmless state, like 'loop vehicle'; 1 */ if (!IS_HUMAN_PLAYER(num) && p->ai.state == 20) p->ai.state = 1; + if (p->is_ai && (!_networking || _network_server) && _ai.enabled) + AI_StartNewAI(p->index); + return true; } -- cgit v1.2.3-54-g00ecf