<URL: http://bugs.freeciv.org/Ticket/Display.html?id=36185 >

This patch removes the unused game.trireme_loss_chance[i] values.

I will commit immediately.

-jason

Index: version.in
===================================================================
--- version.in	(revision 12648)
+++ version.in	(working copy)
@@ -24,4 +24,4 @@
 #   - Avoid adding a new manditory capbility to the development branch for
 #     as long as possible.  We want to maintain network compatibility with
 #     the stable branch for as long as possible.
-FREECIV_NETWORK_CAPSTRING("+Freeciv.Devel.2007.Jan.21")
+FREECIV_NETWORK_CAPSTRING("+Freeciv.Devel.2007.Feb.17")
Index: server/ruleset.c
===================================================================
--- server/ruleset.c	(revision 12648)
+++ server/ruleset.c	(working copy)
@@ -1014,19 +1014,6 @@
     free(def_vblist);
   }
 
-  /* highseas loss pct */
-  def_vblist = secfile_lookup_int_vec(file, &vet_levels_default,
-  		  	"veteran_system.veteran_highseas_loss_pct");
-  for (i = 0; i < vet_levels_default; i++) {
-    game.trireme_loss_chance[i] = def_vblist[i];
-  }
-  for (; i < MAX_VET_LEVELS; i++) {
-    game.trireme_loss_chance[i] = 50; /* default */
-  }
-  if (def_vblist) {
-    free(def_vblist);
-  }
-  
   /* move bonus */
   def_vblist = secfile_lookup_int_vec(file, &vet_levels_default,
                                       "veteran_system.veteran_move_bonus");
@@ -3205,8 +3192,6 @@
 {
   struct packet_ruleset_game misc_p;
 
-  memcpy(misc_p.trireme_loss_chance, game.trireme_loss_chance, 
-         sizeof(game.trireme_loss_chance));
   memcpy(misc_p.work_veteran_chance, game.work_veteran_chance, 
          sizeof(game.work_veteran_chance));
   memcpy(misc_p.veteran_chance, game.veteran_chance, 
Index: data/civ1/units.ruleset
===================================================================
--- data/civ1/units.ruleset	(revision 12648)
+++ data/civ1/units.ruleset	(working copy)
@@ -28,10 +28,6 @@
 ; performing useful work (per turn)
 veteran_work_raise_chance = 0, 0
 
-; The chances of a trireme being lost at sea when not adjacent to a
-; land tile.
-veteran_highseas_loss_pct = 50, 50
-
 ; The additional number of movement points granted for different veteran
 ; levels.  These are thirds of points, so to increase movement
 ; by a whole point 3 must be specified.
Index: data/civ2/units.ruleset
===================================================================
--- data/civ2/units.ruleset	(revision 12648)
+++ data/civ2/units.ruleset	(working copy)
@@ -28,10 +28,6 @@
 ; performing useful work (per turn)
 veteran_work_raise_chance = 0, 0
 
-; The chances of a trireme being lost at sea when not adjacent to a
-; land tile.
-veteran_highseas_loss_pct = 50, 50
-
 ; The additional number of movement points granted for different veteran
 ; levels.  These are thirds of points, so to increase movement
 ; by a whole point 3 must be specified.
Index: data/default/units.ruleset
===================================================================
--- data/default/units.ruleset	(revision 12648)
+++ data/default/units.ruleset	(working copy)
@@ -34,10 +34,6 @@
 ; performing useful work (per turn)
 veteran_work_raise_chance = 5, 3, 1, 0
 
-; The chances of a trireme being lost at sea when not adjacent to a
-; land tile.
-veteran_highseas_loss_pct = 50, 25, 5, 0
-
 ; The additional number of movement points granted for different veteran
 ; levels.  These are thirds of points, so to increase movement
 ; by a whole point 3 must be specified.
Index: common/packets.def
===================================================================
--- common/packets.def	(revision 12648)
+++ common/packets.def	(working copy)
@@ -1092,7 +1092,6 @@
   UINT8 default_specialist;
 
   TECH_LIST global_init_techs[MAX_NUM_TECH_LIST];
-  UINT8 trireme_loss_chance[MAX_VET_LEVELS];
   UINT8 work_veteran_chance[MAX_VET_LEVELS];
   UINT8 veteran_chance[MAX_VET_LEVELS];
 end
Index: common/packets_gen.c
===================================================================
--- common/packets_gen.c	(revision 12648)
+++ common/packets_gen.c	(working copy)
@@ -22378,7 +22378,7 @@
 
 #define cmp_packet_ruleset_game_100 cmp_const
 
-BV_DEFINE(packet_ruleset_game_100_fields, 5);
+BV_DEFINE(packet_ruleset_game_100_fields, 4);
 
 static struct packet_ruleset_game *receive_packet_ruleset_game_100(struct connection *pc, enum packet_type type)
 {
@@ -22423,7 +22423,7 @@
       int readin;
     
       dio_get_uint8(&din, &readin);
-      real_packet->trireme_loss_chance[i] = readin;
+      real_packet->work_veteran_chance[i] = readin;
     }
       }
     }
@@ -22438,21 +22438,6 @@
       int readin;
     
       dio_get_uint8(&din, &readin);
-      real_packet->work_veteran_chance[i] = readin;
-    }
-      }
-    }
-  }
-  if (BV_ISSET(fields, 4)) {
-    
-    {
-      int i;
-    
-      for (i = 0; i < MAX_VET_LEVELS; i++) {
-        {
-      int readin;
-    
-      dio_get_uint8(&din, &readin);
       real_packet->veteran_chance[i] = readin;
     }
       }
@@ -22518,7 +22503,7 @@
       if(!differ) {
         int i;
         for (i = 0; i < MAX_VET_LEVELS; i++) {
-          if (old->trireme_loss_chance[i] != real_packet->trireme_loss_chance[i]) {
+          if (old->work_veteran_chance[i] != real_packet->work_veteran_chance[i]) {
             differ = TRUE;
             break;
           }
@@ -22534,7 +22519,7 @@
       if(!differ) {
         int i;
         for (i = 0; i < MAX_VET_LEVELS; i++) {
-          if (old->work_veteran_chance[i] != real_packet->work_veteran_chance[i]) {
+          if (old->veteran_chance[i] != real_packet->veteran_chance[i]) {
             differ = TRUE;
             break;
           }
@@ -22544,22 +22529,6 @@
   if(differ) {different++;}
   if(differ) {BV_SET(fields, 3);}
 
-
-    {
-      differ = (MAX_VET_LEVELS != MAX_VET_LEVELS);
-      if(!differ) {
-        int i;
-        for (i = 0; i < MAX_VET_LEVELS; i++) {
-          if (old->veteran_chance[i] != real_packet->veteran_chance[i]) {
-            differ = TRUE;
-            break;
-          }
-        }
-      }
-    }
-  if(differ) {different++;}
-  if(differ) {BV_SET(fields, 4);}
-
   if (different == 0 && !force_send_of_unchanged) {
     return 0;
   }
@@ -22578,7 +22547,7 @@
       int i;
 
       for (i = 0; i < MAX_VET_LEVELS; i++) {
-        dio_put_uint8(&dout, real_packet->trireme_loss_chance[i]);
+        dio_put_uint8(&dout, real_packet->work_veteran_chance[i]);
       }
     } 
   }
@@ -22588,16 +22557,6 @@
       int i;
 
       for (i = 0; i < MAX_VET_LEVELS; i++) {
-        dio_put_uint8(&dout, real_packet->work_veteran_chance[i]);
-      }
-    } 
-  }
-  if (BV_ISSET(fields, 4)) {
-  
-    {
-      int i;
-
-      for (i = 0; i < MAX_VET_LEVELS; i++) {
         dio_put_uint8(&dout, real_packet->veteran_chance[i]);
       }
     } 
Index: common/packets_gen.h
===================================================================
--- common/packets_gen.h	(revision 12648)
+++ common/packets_gen.h	(working copy)
@@ -803,7 +803,6 @@
 struct packet_ruleset_game {
   int default_specialist;
   int global_init_techs[MAX_NUM_TECH_LIST];
-  int trireme_loss_chance[MAX_VET_LEVELS];
   int work_veteran_chance[MAX_VET_LEVELS];
   int veteran_chance[MAX_VET_LEVELS];
 };
Index: common/game.h
===================================================================
--- common/game.h	(revision 12648)
+++ common/game.h	(working copy)
@@ -112,7 +112,6 @@
     bool save_private_map; /* FoW map; will be created if not saved */
   } save_options;
 
-  int trireme_loss_chance[MAX_VET_LEVELS];
   int work_veteran_chance[MAX_VET_LEVELS];
   int veteran_chance[MAX_VET_LEVELS];
 
Index: client/packhand.c
===================================================================
--- client/packhand.c	(revision 12648)
+++ client/packhand.c	(working copy)
@@ -2590,7 +2590,6 @@
   DEFAULT_SPECIALIST = packet->default_specialist;
 
   for (i = 0; i < MAX_VET_LEVELS; i++) {
-    game.trireme_loss_chance[i] = packet->trireme_loss_chance[i];
     game.work_veteran_chance[i] = packet->work_veteran_chance[i];
     game.veteran_chance[i] = packet->work_veteran_chance[i];
   }
_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to