stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus data/ccl/anim.ccl data/ccl/human/unit...


From: Crestez Leonard
Subject: [Stratagus-CVS] stratagus data/ccl/anim.ccl data/ccl/human/unit...
Date: Sun, 09 Nov 2003 19:54:56 -0500

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Crestez Leonard <address@hidden>        03/11/09 19:54:56

Modified files:
        data/ccl       : anim.ccl 
        data/ccl/human : units.ccl 
        src/action     : action_resource.c actions.c 

Log message:
        Fixed resource bug.

Patches:
Index: stratagus/data/ccl/anim.ccl
diff -u stratagus/data/ccl/anim.ccl:1.24 stratagus/data/ccl/anim.ccl:1.25
--- stratagus/data/ccl/anim.ccl:1.24    Sun Nov  2 18:04:41 2003
+++ stratagus/data/ccl/anim.ccl Sun Nov  9 19:54:55 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: anim.ccl,v 1.24 2003/11/02 23:04:41 jsalmon3 Exp $
+;;     $Id: anim.ccl,v 1.25 2003/11/10 00:54:55 n0body Exp $
 
 ;;------
 ;;     Footman, Grunt, Grom Hellscream, Danath, Korgath Bladefist
@@ -56,6 +56,9 @@
     #( 0 0   3  25) #( 0 0   3  30) #( 0 0   3  35) #(12 0   5  40)
     #( 0 0   3  45) #( 0 0   7  25) #( 3 0   1  25))
   'harvest 'wood '(    ; #25
+    #( 0 0   3  25) #( 0 0   3  30) #( 0 0   3  35) #(12 0   5  40)
+    #( 0 0   3  45) #( 0 0   7  25) #( 3 0   1  25))
+  'harvest 'gold '(    ; #25
     #( 0 0   3  25) #( 0 0   3  30) #( 0 0   3  35) #(12 0   5  40)
     #( 0 0   3  45) #( 0 0   7  25) #( 3 0   1  25))
   'repair '(   ; #25
Index: stratagus/data/ccl/human/units.ccl
diff -u stratagus/data/ccl/human/units.ccl:1.49 
stratagus/data/ccl/human/units.ccl:1.50
--- stratagus/data/ccl/human/units.ccl:1.49     Sat Nov  8 21:42:05 2003
+++ stratagus/data/ccl/human/units.ccl  Sun Nov  9 19:54:55 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: units.ccl,v 1.49 2003/11/09 02:42:05 n0body Exp $
+;;     $Id: units.ccl,v 1.50 2003/11/10 00:54:55 n0body Exp $
 
 ;;=============================================================================
 ;;     Define unit-types.
@@ -91,6 +91,7 @@
   'can-gather-resource '(
     file-when-loaded "human/units/peasant_with_gold.png"  
     resource-id gold
+;;    harvest-from-outside
     resource-capacity 100
     wait-at-resource 150
     wait-at-depot 150)
Index: stratagus/src/action/action_resource.c
diff -u stratagus/src/action/action_resource.c:1.67 
stratagus/src/action/action_resource.c:1.68
--- stratagus/src/action/action_resource.c:1.67 Sun Nov  9 17:13:56 2003
+++ stratagus/src/action/action_resource.c      Sun Nov  9 19:54:55 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: action_resource.c,v 1.67 2003/11/09 22:13:56 n0body Exp $
+//     $Id: action_resource.c,v 1.68 2003/11/10 00:54:55 n0body Exp $
 
 //@{
 
@@ -125,7 +125,7 @@
                break;
            default:
                // Goal gone or something.
-               if (!unit->Reset || GoalGone(unit, goal)) {
+               if (!unit->Reset || !GoalGone(unit, goal)) {
                    return 0;
                }
                break;
@@ -753,6 +753,7 @@
        DebugLevel3Fn("Started mining. reset path.\n");
        unit->SubAction = SUB_MOVE_TO_RESOURCE;
     }
+    DebugCheck(!unit->CurrentResource);
 
     //  Move to the resource location.
     if (unit->SubAction >= SUB_MOVE_TO_RESOURCE &&
Index: stratagus/src/action/actions.c
diff -u stratagus/src/action/actions.c:1.105 
stratagus/src/action/actions.c:1.106
--- stratagus/src/action/actions.c:1.105        Sun Nov  9 17:13:56 2003
+++ stratagus/src/action/actions.c      Sun Nov  9 19:54:56 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: actions.c,v 1.105 2003/11/09 22:13:56 n0body Exp $
+//     $Id: actions.c,v 1.106 2003/11/10 00:54:56 n0body Exp $
 
 //@{
 
@@ -101,7 +101,11 @@
            }
            //
            //  Check if under fog of war.
+           //  Don't bother for goals visible under fog.
            //
+           if (goal->Type->VisibleUnderFog) {
+               return 0;
+           }
            for (x = goal->X; x < goal->X + goal->Type->TileWidth; x++) {
                for (y = goal->Y; y < goal->Y + goal->Type->TileHeight; y++) {
                    if (IsMapFieldVisible(unit->Player, x, y)) {




reply via email to

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