Complete.Org: Mailing Lists: Archives: freeciv-dev: April 2000:
[Freeciv-Dev] Re: Invasion bug
Home

[Freeciv-Dev] Re: Invasion bug

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Thue Janus Kristensen <thue@xxxxxxx>
Cc: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Invasion bug
From: Anders Wegge Jakobsen <wegge@xxxxxxxx>
Date: 08 Apr 2000 13:19:07 +0200
Reply-to: wegge@xxxxxxxx

"Thue" == Thue Janus Kristensen <thue@xxxxxxx> writes:

 > 1) your patch is a bit hard to read :). Read the contributing section on
 > the freeciv website to see how patches are best made.

 What is the problem with uuencode? Or cvs diff -u for that matter?

 > 2) my full fog of war patch that was just commited to CVS is
 > allmost garantied to be incompatible with your patch (and may even have
 > fixed the bug). Download CVS and see and submit an updated patch (or send
 > the original patch to me in a readable form)

 As the diff if valid againts CVS on 12:16 00/04/08, I somehow doubt
that it will conflict with the FoW patch. In fact, I suspect that the
bug has been introduced by it.

 > -Thue

 > On Sat, 08 Apr 2000, Anders Wegge Jakobsen wrote:
 >> Hi!
 >> 
 >> I noticed that within the last few weeks of CVS, the unit invading a
 >> city will be transfered from it's original city to the one just
 >> invaded. I belive this to be a bug. I have included a very minimal
 >> patch below that corrects this behaviour.
 >> 

 I cannot be bothered to go and switch MUA. If you still don't like
uuencode, you can try to make sense of this:

Index: freeciv/server/citytools.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/citytools.c,v
retrieving revision 1.72
diff -u -r1.72 citytools.c
--- citytools.c 2000/04/07 21:37:47     1.72
+++ citytools.c 2000/04/08 06:04:53
@@ -618,9 +618,12 @@
                      unit_name(vunit->type), vcity->name,
                      pvictim->name, pplayer->name);
       }
-      create_unit_full(pplayer, x, y, vunit->type, vunit->veteran,
-                      pcity->id, vunit->moves_left, vunit->hp);
-      wipe_unit(0, vunit);
+      /* 000608 wegge Dont transfer units already owned by new city-owner */ 
+      if (vunit->owner != pplayer->player_no) {
+       create_unit_full(pplayer, x, y, vunit->type, vunit->veteran,
+                        pcity->id, vunit->moves_left, vunit->hp);
+       wipe_unit(0, vunit);
+      }
     } unit_list_iterate_end;
   }
 



-- 
/Wegge



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