1
0
mirror of https://github.com/OpenTTD/OpenTTD.git synced 2025-08-30 09:59:10 +00:00

(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.
This commit is contained in:
2006-01-04 20:18:39 +00:00
parent 911a8aa08d
commit 4b464093e7
4 changed files with 11 additions and 6 deletions

View File

@@ -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;
}