Complete.Org: Mailing Lists: Archives: freeciv-dev: January 1999:
[Freeciv-Dev] REVISED PATCH: Minor improvements to server/gotohand.c.
Home

[Freeciv-Dev] REVISED PATCH: Minor improvements to server/gotohand.c.

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxxx
Subject: [Freeciv-Dev] REVISED PATCH: Minor improvements to server/gotohand.c.
From: Tony & <stuckey@xxxxxxxxxxxxxxxxx>
Date: Tue, 5 Jan 1999 19:09:38 -0600

        This is a revision of the previous patch.

Index: server/gotohand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/gotohand.c,v
retrieving revision 1.24
diff -u -r1.24 gotohand.c
--- gotohand.c  1998/12/15 09:51:05     1.24
+++ gotohand.c  1999/01/05 02:26:53
@@ -115,14 +115,16 @@
 
   add_to_stack(orig_x, orig_y);
 
-  if (punit && unit_flag(punit->type, F_IGTER)) igter++;
-  if (punit && punit->type == U_SETTLERS) maxcost >>= 1;
+  if (punit) {
+    if(unit_flag(punit->type, F_IGTER)) igter++;
+    if (punit->type == U_SETTLERS) maxcost >>= 1;
+    }
 
   do {
     get_from_warstack(warnodes, &x, &y);
     warnodes++; /* for debug purposes */
     tile0 = map_get_tile(x, y);
-    if((xx[2]=x+1)==map.xsize) xx[2]=0;
+    xx[2]=(x+1) % map.xsize;
     if((xx[0]=x-1)==-1) xx[0]=map.xsize-1;
     xx[1] = x;
     if ((yy[0]=y-1)==-1) yy[0] = 0;

-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
 I watched them burn out one by one."  -Warren Zevon

----- End forwarded message -----

-- 
Anthony J. Stuckey                              stuckey@xxxxxxxxxxxxxxxxx
"When I was young, the sky was filled with stars.
 I watched them burn out one by one."  -Warren Zevon


[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] REVISED PATCH: Minor improvements to server/gotohand.c., Tony & <=