mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-01-31 11:23:21 +00:00
(svn r3250) -Fix: AIs weren't uninitialized when a new game was loaded
This commit is contained in:
parent
6ed22fb3d4
commit
480b1575fe
3
ai/ai.c
3
ai/ai.c
@ -309,6 +309,9 @@ void AI_Initialize(void)
|
||||
char *tmp_ai_gpmi_param = strdup(_ai.gpmi_param);
|
||||
#endif /* GPMI */
|
||||
|
||||
/* First, make sure all AIs are DEAD! */
|
||||
AI_Uninitialize();
|
||||
|
||||
memset(&_ai, 0, sizeof(_ai));
|
||||
memset(&_ai_player, 0, sizeof(_ai_player));
|
||||
|
||||
|
2
misc.c
2
misc.c
@ -18,6 +18,7 @@
|
||||
#include "engine.h"
|
||||
#include "vehicle_gui.h"
|
||||
#include "variables.h"
|
||||
#include "ai/ai.h"
|
||||
|
||||
extern void StartupEconomy(void);
|
||||
|
||||
@ -167,6 +168,7 @@ void InitializeGame(uint size_x, uint size_y)
|
||||
InitializeTrains();
|
||||
InitializeNPF();
|
||||
|
||||
AI_Initialize();
|
||||
InitializePlayers();
|
||||
InitializeCheats();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user