[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Stratagus-CVS] stratagus/src/unit script_unit.c
From: |
address@hidden |
Subject: |
[Stratagus-CVS] stratagus/src/unit script_unit.c |
Date: |
21 Jan 2004 11:45:35 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/01/21 11:45:34
Modified files:
src/unit : script_unit.c
Log message:
Fixed load/save bugs
Patches:
Index: stratagus/src/unit/script_unit.c
diff -u stratagus/src/unit/script_unit.c:1.94
stratagus/src/unit/script_unit.c:1.95
--- stratagus/src/unit/script_unit.c:1.94 Mon Jan 19 09:36:31 2004
+++ stratagus/src/unit/script_unit.c Wed Jan 21 11:45:34 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: script_unit.c,v 1.94 2004/01/18 22:36:31 nobody_ Exp $
+// $Id: script_unit.c,v 1.95 2004/01/21 00:45:34 jsalmon3 Exp $
//@{
@@ -546,7 +546,7 @@
lua_pop(l, 1);
} else if (!strcmp(value, "count")) {
lua_rawgeti(l, -1, j + 1);
- unit->Data.Train.Count = LuaToNumber(l, 1);
+ unit->Data.Train.Count = LuaToNumber(l, -1);
lua_pop(l, 1);
} else if (!strcmp(value, "queue")) {
int subargs;
@@ -561,6 +561,7 @@
for (i = 0, k = 0; i < MAX_UNIT_TRAIN && k < subargs;
++i, ++k) {
lua_rawgeti(l, -1, k + 1);
value = LuaToString(l, -1);
+ lua_pop(l, 1);
if (!strcmp(value, "unit-none")) {
unit->Data.Train.What[i] = NULL;
} else {