Complete.Org: Mailing Lists: Archives: freeciv-dev: March 2005:
[Freeciv-Dev] (PR#12373) Contact turns isn't updated correctly
Home

[Freeciv-Dev] (PR#12373) Contact turns isn't updated correctly

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Subject: [Freeciv-Dev] (PR#12373) Contact turns isn't updated correctly
From: "Mateusz Stefek" <mstefek@xxxxxxxxx>
Date: Sun, 6 Mar 2005 02:06:08 -0800
Reply-to: bugs@xxxxxxxxxxx

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

> [mstefek - Sun Feb 27 10:17:58 2005]:
> 
> Load attached savegame. You can meet with Mordorians, in the next turn
> you can't . That's ok because in the savegame contact_turns_left = 1.
> The problem is that the player report still displays "Contact" in the
> embassy column.
> I can see this behaviour in both branches, the savegame isn't edited.
> --
> mateusz
This one was hard to find, but easy to understand. The bug was actualy
in delta in the are_diplstates_equal() function. Patch attached.
--
mateusz
Index: common/player.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/common/player.c,v
retrieving revision 1.157.2.3
diff -u -r1.157.2.3 player.c
--- common/player.c     22 Feb 2005 00:00:32 -0000      1.157.2.3
+++ common/player.c     6 Mar 2005 10:01:55 -0000
@@ -711,7 +711,8 @@
                          const struct player_diplstate *pds2)
 {
   return (pds1->type == pds2->type && pds1->turns_left == pds2->turns_left
-         && pds1->has_reason_to_cancel == pds2->has_reason_to_cancel);
+         && pds1->has_reason_to_cancel == pds2->has_reason_to_cancel
+         && pds1->contact_turns_left == pds2->contact_turns_left);
 }
 
 /***************************************************************************

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#12373) Contact turns isn't updated correctly, Mateusz Stefek <=