stratagus-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Stratagus-CVS] stratagus/src/unit ccl_unittype.c


From: Jimmy Salmon
Subject: [Stratagus-CVS] stratagus/src/unit ccl_unittype.c
Date: Tue, 02 Dec 2003 19:24:04 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Jimmy Salmon <address@hidden>   03/12/02 19:24:04

Modified files:
        src/unit       : ccl_unittype.c 

Log message:
        Remove type->Magic

Patches:
Index: stratagus/src/unit/ccl_unittype.c
diff -u stratagus/src/unit/ccl_unittype.c:1.121 
stratagus/src/unit/ccl_unittype.c:1.122
--- stratagus/src/unit/ccl_unittype.c:1.121     Tue Dec  2 01:13:00 2003
+++ stratagus/src/unit/ccl_unittype.c   Tue Dec  2 19:24:03 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: ccl_unittype.c,v 1.121 2003/12/02 06:13:00 mr-russ Exp $
+//     $Id: ccl_unittype.c,v 1.122 2003/12/03 00:24:03 jsalmon3 Exp $
 
 //@{
 
@@ -1252,8 +1252,12 @@
                type->CanCastSpell = malloc(SpellTypeCount);
                memset(type->CanCastSpell, 0, SpellTypeCount);
            }
-           type->Magic = 0;
            subargs = luaL_getn(l, j + 1);
+           if (subargs == 0) {
+               free(type->CanCastSpell);
+               type->CanCastSpell = NULL;
+
+           }
            for (k = 0; k < subargs; ++k) {
                int id;
 
@@ -1267,7 +1271,6 @@
                    lua_error(l);
                }
                type->CanCastSpell[id] = 1;
-               type->Magic = 1;
            }
        } else if (!strcmp(value, "can-target-flag")) {
            //




reply via email to

[Prev in Thread] Current Thread [Next in Thread]