stratagus-cvs
[Top][All Lists]
Advanced

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

[Stratagus-CVS] stratagus/src/action action_resource.c


From: Crestez Leonard
Subject: [Stratagus-CVS] stratagus/src/action action_resource.c
Date: Fri, 24 Oct 2003 20:41:09 -0400

CVSROOT:        /cvsroot/stratagus
Module name:    stratagus
Branch:         
Changes by:     Crestez Leonard <address@hidden>        03/10/24 20:41:09

Modified files:
        src/action     : action_resource.c 

Log message:
        Fixed resource bug? TEST!

Patches:
Index: stratagus/src/action/action_resource.c
diff -u stratagus/src/action/action_resource.c:1.59 
stratagus/src/action/action_resource.c:1.60
--- stratagus/src/action/action_resource.c:1.59 Fri Oct 17 02:04:29 2003
+++ stratagus/src/action/action_resource.c      Fri Oct 24 20:41:08 2003
@@ -26,7 +26,7 @@
 //      Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
 //      02111-1307, USA.
 //
-//     $Id: action_resource.c,v 1.59 2003/10/17 06:04:29 mr-russ Exp $
+//     $Id: action_resource.c,v 1.60 2003/10/25 00:41:08 n0body Exp $
 
 //@{
 
@@ -102,10 +102,12 @@
                    unit->Orders->X = x;
                    unit->Orders->Y = y;
                    NewResetPath(unit);
-                   DebugLevel3Fn("Found a better place to harvest %d,%d\n" _C_ 
x _C_ y);
+                   DebugLevel0Fn("Found a better place to harvest %d,%d\n" _C_ 
x _C_ y);
                    // FIXME: can't this overflow? It really shouldn't, since
                    // x and y are really supossed to be reachable, checked 
thorugh a flood fill.
-                   return MoveToResource(unit);
+                   // I don't know, sometimes shit happens.
+                   //return MoveToResource(unit);
+                   return 0;
                }
                return -1;
            case PF_REACHED:
@@ -149,7 +151,13 @@
     DebugCheck(unit->IX);
     DebugCheck(unit->IY);
     if (resinfo->TerrainHarvester) {
-       DebugCheck(!ForestOnMap(unit->Orders->X, unit->Orders->Y));
+       //
+       //  This shouldn't happend?
+       /*
+       if (!ForestOnMap(unit->Orders->X, unit->Orders->Y)) {
+           DebugLevel0Fn("Wood gone, just like that?\n");
+           return 0;
+       }*/
        UnitHeadingFromDeltaXY(unit, unit->Orders->X - unit->X,
            unit->Orders->Y - unit->Y);
        if (resinfo->WaitAtResource) {




reply via email to

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