diff options
author | Yexo <yexo@openttd.org> | 2009-02-03 20:49:08 +0000 |
---|---|---|
committer | Yexo <yexo@openttd.org> | 2009-02-03 20:49:08 +0000 |
commit | 1892c34ac6b97de271e762e4464c02e8cb97416e (patch) | |
tree | 190d79c7b3f35a3425b19dd635814463ba1844df /src/ai/ai_instance.hpp | |
parent | 9c4c0ff3a190869c1a217427584d5d6034373c07 (diff) | |
download | openttd-1892c34ac6b97de271e762e4464c02e8cb97416e.tar.xz |
(svn r15327) -Fix (r15027): AIs could access the map and other data in their constructor and Load() function while the savegame was not completely loaded.
Diffstat (limited to 'src/ai/ai_instance.hpp')
-rw-r--r-- | src/ai/ai_instance.hpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/ai/ai_instance.hpp b/src/ai/ai_instance.hpp index 5bd3b58b5..688b3c133 100644 --- a/src/ai/ai_instance.hpp +++ b/src/ai/ai_instance.hpp @@ -85,14 +85,19 @@ public: static void SaveEmpty(); /** - * Load data from a savegame and call the AI Load function if it - * exists. + * Load data from a savegame and store it on the stack. * @param version The version of the AI when saving, or -1 if this was * not the original AI saving the game. */ void Load(int version); /** + * Call the AI Load function if it exists and data was loaded + * from a savegame. + */ + void CallLoad(); + + /** * Load and discard data from a savegame. */ static void LoadEmpty(); |