summaryrefslogtreecommitdiff
path: root/src/ai/ai_instance.cpp
diff options
context:
space:
mode:
authorYexo <yexo@openttd.org>2009-02-03 21:05:32 +0000
committerYexo <yexo@openttd.org>2009-02-03 21:05:32 +0000
commit101f55e65cd43daea211b26b5fe5666968a507f4 (patch)
treef36e34986525f0d476619f1ef5d0dbceb83d4d53 /src/ai/ai_instance.cpp
parent1892c34ac6b97de271e762e4464c02e8cb97416e (diff)
downloadopenttd-101f55e65cd43daea211b26b5fe5666968a507f4.tar.xz
(svn r15328) -Fix (r15327): Load(data, version) was called instead of Load(version, data).
Diffstat (limited to 'src/ai/ai_instance.cpp')
-rw-r--r--src/ai/ai_instance.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ai/ai_instance.cpp b/src/ai/ai_instance.cpp
index cb1a04171..26d55481b 100644
--- a/src/ai/ai_instance.cpp
+++ b/src/ai/ai_instance.cpp
@@ -507,7 +507,7 @@ void AIInstance::Save()
return;
}
/* Push the loaded savegame data to the top of the stack. */
- sq_push(vm, -3);
+ sq_push(vm, -2);
_ai_sl_byte = 1;
SlObject(NULL, _ai_byte);
/* Save the data that was just loaded. */
@@ -623,8 +623,8 @@ void AIInstance::Load(int version)
/* First remove the value "false" since we have data to load. */
sq_poptop(vm);
- LoadObjects(vm);
sq_pushinteger(vm, version);
+ LoadObjects(vm);
sq_pushbool(vm, true);
}
@@ -655,7 +655,7 @@ void AIInstance::CallLoad()
sq_get(vm, -2);
/* Push the main instance as "this" object */
sq_pushobject(vm, *this->instance);
- /* Push the savegame data and version as arguments */
+ /* Push the version data and savegame data as arguments */
sq_push(vm, -5);
sq_push(vm, -5);
@@ -663,7 +663,7 @@ void AIInstance::CallLoad()
* function pointer) from the stack. */
sq_call(vm, 3, SQFalse, SQFalse);
- /* Pop 1) The savegame data, 2) the version, 3) the object instance, 4) the function pointer. */
+ /* Pop 1) The version, 2) the savegame data, 3) the object instance, 4) the function pointer. */
sq_pop(vm, 4);
AIObject::SetAllowDoCommand(true);