[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: |
8 Feb 2004 12:22:03 +1100 |
CVSROOT: /home/strat
Module name: stratagus
Changes by: <address@hidden> 04/02/08 12:22:02
Modified files:
src/unit : script_unit.c
Log message:
Applied jarod's save autocast mini-patch.
Patches:
Index: stratagus/src/unit/script_unit.c
diff -u stratagus/src/unit/script_unit.c:1.106
stratagus/src/unit/script_unit.c:1.107
--- stratagus/src/unit/script_unit.c:1.106 Sun Feb 8 12:11:57 2004
+++ stratagus/src/unit/script_unit.c Sun Feb 8 12:22:02 2004
@@ -26,7 +26,7 @@
// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
// 02111-1307, USA.
//
-// $Id: script_unit.c,v 1.106 2004/02/08 01:11:57 nobody_ Exp $
+// $Id: script_unit.c,v 1.107 2004/02/08 01:22:02 nobody_ Exp $
//@{
@@ -936,7 +936,11 @@
unit->Goal = UnitSlots[(int)LuaToNumber(l, j + 1)];
} else if (!strcmp(value, "auto-cast")) {
s = LuaToString(l, j + 1);
- DebugCheck(SpellTypeByIdent(s)->Slot == -1);
+ DebugCheck(!SpellTypeByIdent(s));
+ if (!unit->AutoCastSpell) {
+ unit->AutoCastSpell = malloc(SpellTypeCount);
+ memset(unit->AutoCastSpell, 0, SpellTypeCount);
+ }
unit->AutoCastSpell[SpellTypeByIdent(s)->Slot] = 1;
} else {
// FIXME: this leaves a half initialized unit
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Stratagus-CVS] stratagus/src/unit script_unit.c,
address@hidden <=