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:
@@ -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;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user