stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus data/ccl/human/buttons.ccl src/action...


From: Crestez Leonard
Subject: [Stratagus-CVS] stratagus data/ccl/human/buttons.ccl src/action...
Date: Wed, 05 Nov 2003 04:30:48 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Crestez Leonard <address@hidden>        03/11/05 04:30:47

Modified files:
        data/ccl/human : buttons.ccl 
        src/action     : command.c 
        src/clone      : spells.c 
        src/missile    : missile.c 

Log message:
        Fixed spell show order bug.

Patches:
Index: stratagus/data/ccl/human/buttons.ccl
diff -u stratagus/data/ccl/human/buttons.ccl:1.29 
stratagus/data/ccl/human/buttons.ccl:1.30
--- stratagus/data/ccl/human/buttons.ccl:1.29   Tue Oct 28 17:20:52 2003
+++ stratagus/data/ccl/human/buttons.ccl        Wed Nov  5 04:30:45 2003
@@ -26,7 +26,7 @@
 ;;      along with this program; if not, write to the Free Software
 ;;      Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
USA
 ;;
-;;     $Id: buttons.ccl,v 1.29 2003/10/28 22:20:52 n0body Exp $
+;;     $Id: buttons.ccl,v 1.30 2003/11/05 09:30:45 n0body Exp $
 
 ;;----------------------------------------------------------------------------
 ;;     Define unit-button.
@@ -218,8 +218,8 @@
   'for-unit '(unit-mage unit-white-mage))
 
 (define-button 'pos 8 'level 0 'icon 'icon-polymorph
-;  'action 'cast-spell 'value 'spell-polymorph
-  'action 'cast-spell 'value 'spell-suicide-bomber
+  'action 'cast-spell 'value 'spell-polymorph
+;  'action 'cast-spell 'value 'spell-suicide-bomber
   'allowed 'check-upgrade 'allow-arg '(upgrade-polymorph)
   'key "p" 'hint "~!POLYMORPH"
   'for-unit '(unit-mage unit-white-mage))
Index: stratagus/src/action/command.c
diff -u stratagus/src/action/command.c:1.114 
stratagus/src/action/command.c:1.115
--- stratagus/src/action/command.c:1.114        Tue Nov  4 17:54:34 2003
+++ stratagus/src/action/command.c      Wed Nov  5 04:30:46 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: command.c,v 1.114 2003/11/04 22:54:34 n0body Exp $
+//     $Id: command.c,v 1.115 2003/11/05 09:30:46 n0body Exp $
 
 //@{
 
@@ -1188,8 +1188,9 @@
     }
 #endif
 
-    DebugLevel0Fn(": %d spell-casts on %d\n" _C_
-       UnitNumber(unit) _C_ dest ? UnitNumber(dest) : 0);
+    DebugLevel0Fn(": %d casts %s at %d %d on %d\n" _C_
+       UnitNumber(unit) _C_ spell->IdentName _C_ x _C_ y _C_ dest ? 
UnitNumber(dest) : 0);
+    DebugCheck(!unit->Type->CanCastSpell[spell->Ident]);
 
     //
     // Check if unit is still valid? (NETWORK!)
@@ -1197,16 +1198,6 @@
     if (!unit->Removed && unit->Orders[0].Action != UnitActionDie) {
        // FIXME: should I check here, if there is still enough mana?
 
-       /*
-       FIXME: vladi: any unit can cast spell, like dark-portal
-       if (unit->Type->Building) {
-           // FIXME: should find a better way for pending orders.
-           order=&unit->NewOrder;
-           ReleaseOrder(order);
-       } else if (!(order=GetNextOrder(unit,flush))) {
-           return;
-       }
-       */
        if (!(order = GetNextOrder(unit, flush))) {
            return;
        }
@@ -1233,9 +1224,8 @@
                dest->Refs++;
            }
        } else {
-           order->X = x-order->Range;
-           order->Y = y-order->Range;
-           order->Goal = NoUnitP;
+           order->X = x;
+           order->Y = y;
            order->Range <<= 1;
        }
        order->Type = NULL;
Index: stratagus/src/clone/spells.c
diff -u stratagus/src/clone/spells.c:1.120 stratagus/src/clone/spells.c:1.121
--- stratagus/src/clone/spells.c:1.120  Tue Nov  4 17:54:34 2003
+++ stratagus/src/clone/spells.c        Wed Nov  5 04:30:47 2003
@@ -27,7 +27,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: spells.c,v 1.120 2003/11/04 22:54:34 n0body Exp $
+//     $Id: spells.c,v 1.121 2003/11/05 09:30:47 n0body Exp $
 
 /*
 **     And when we cast our final spell
@@ -1189,9 +1189,6 @@
     if (target) {
        x = target->X;
        y = target->Y;
-    } else {
-       x += spell->Range;      // Why ??
-       y += spell->Range;      // Why ??
     }
     //
     // For TargetSelf, you target.... YOURSELF
Index: stratagus/src/missile/missile.c
diff -u stratagus/src/missile/missile.c:1.106 
stratagus/src/missile/missile.c:1.107
--- stratagus/src/missile/missile.c:1.106       Thu Oct 30 07:56:56 2003
+++ stratagus/src/missile/missile.c     Wed Nov  5 04:30:47 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: missile.c,v 1.106 2003/10/30 12:56:56 pludov Exp $
+//     $Id: missile.c,v 1.107 2003/11/05 09:30:47 n0body Exp $
 
 //@{
 
@@ -1346,7 +1346,7 @@
 
     DebugCheck(file == NULL);
     CLprintf(file, "\n;;; -----------------------------------------\n");
-    CLprintf(file, ";;; MODULE: missile-types $Id: missile.c,v 1.106 
2003/10/30 12:56:56 pludov Exp $\n\n");
+    CLprintf(file, ";;; MODULE: missile-types $Id: missile.c,v 1.107 
2003/11/05 09:30:47 n0body Exp $\n\n");
 
     //
     // Original number to internal missile-type name.
@@ -1455,7 +1455,7 @@
 
     DebugCheck(file == NULL);
     CLprintf(file,"\n;;; -----------------------------------------\n");
-    CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.106 2003/10/30 
12:56:56 pludov Exp $\n\n");
+    CLprintf(file,";;; MODULE: missiles $Id: missile.c,v 1.107 2003/11/05 
09:30:47 n0body Exp $\n\n");
 
     for (missiles = GlobalMissiles; *missiles; ++missiles) {
        SaveMissile(*missiles, file);
@@ -1673,7 +1673,7 @@
            missile->SourceY = missile->Y;
            PointToPointMissile(missile);
            //missile->State++;
-           DebugLevel0("HIT %d!\n" _C_ missile->State);
+           DebugLevel3("HIT %d!\n" _C_ missile->State);
            MissileHit(missile);
            // FIXME: hits to left and right
            // FIXME: reduce damage effects on later impacts




reply via email to

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