[Freeciv-Dev] (PR#17828) combat calculations error
[Top] [All Lists]
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
| 
Subject:  | 
[Freeciv-Dev] (PR#17828) combat calculations error | 
 
| 
From:  | 
"Jason Dorje Short" <jdorje@xxxxxxxxx> | 
 
| 
Date:  | 
Sun, 11 Jun 2006 15:54:56 -0700 | 
 
| 
Reply-to:  | 
bugs@xxxxxxxxxxx | 
 
 
 
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17828 >
The defense_bonus for terrains is sent as an SINT8 now.  But this is 
quite incorrect, since defense_bonus for mountains is 200 and will wrap 
around.  Negative defense bonuses (that decrease defense on certain 
terrains) are also possible so a signed value is needed.  The solution 
is to use an SINT16.
This patch fixes it for the dev branch.  A similar patch applies to S2_1.
-jason
 Index: version.in
===================================================================
--- version.in  (revision 12017)
+++ version.in  (working copy)
@@ -24,5 +24,5 @@
 #   - 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.2006.Mar.20")
+FREECIV_NETWORK_CAPSTRING("+Freeciv.Devel.2006.Jun.11")
 
Index: common/packets.def
===================================================================
--- common/packets.def  (revision 12013)
+++ common/packets.def  (working copy)
@@ -1225,7 +1225,7 @@
   STRING graphic_alt[MAX_LEN_NAME];
 
   UINT8 movement_cost;
-  SINT8 defense_bonus;
+  SINT16 defense_bonus;
 
   UINT8 output[O_MAX];
   UINT8 num_resources;
 
| [Prev in Thread] | 
Current Thread | 
[Next in Thread] |   
- [Freeciv-Dev] (PR#17828) combat calculations error,
Jason Dorje Short <=
  
 
 | 
 |