Complete.Org: Mailing Lists: Archives: freeciv-dev: June 2003:
[Freeciv-Dev] Re: (PR#4423) Sea units with base-moverate < 2
Home

[Freeciv-Dev] Re: (PR#4423) Sea units with base-moverate < 2

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: bart@xxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4423) Sea units with base-moverate < 2
From: "Per I. Mathisen" <per@xxxxxxxxxxx>
Date: Thu, 19 Jun 2003 13:20:36 -0700
Reply-to: rt@xxxxxxxxxxxxxx

On Thu, 19 Jun 2003, Guest wrote:
> It would suffice for units with a movement of 0 (as requested), but not
> if the sea unit would have a movement of 1.

Ok, then this should do the job:

     if (move_rate < 2 * SINGLE_MOVE) {
-      move_rate = 2 * SINGLE_MOVE;
+      move_rate = MIN(2 * SINGLE_MOVE, unit_type(punit)->move_rate);
     }
     break;

  - Per


Index: common/unit.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/unit.c,v
retrieving revision 1.175
diff -u -r1.175 unit.c
--- common/unit.c       14 Jun 2003 13:20:51 -0000      1.175
+++ common/unit.c       19 Jun 2003 20:18:45 -0000
@@ -68,7 +68,7 @@
     }
  
     if (move_rate < 2 * SINGLE_MOVE) {
-      move_rate = 2 * SINGLE_MOVE; 
+      move_rate = MIN(2 * SINGLE_MOVE, unit_type(punit)->move_rate);
     }
     break;
 

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