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

Now I am not sure I understand this, but the code in svn seems to have
a bug in players_non_invade(): it should return true while at peace,
but false for all others (like alliance). So I just suggest a simple
change like this, so you can enter if you are allied.

This changes somewhat what was added in PR#12232

Diff to change the players_non_invade function:

Index: common/player.c
--- common/player.c     (revision 12927)
+++ common/player.c     (arbetskopia)
@@ -741,7 +741,7 @@
                        const struct player *pplayer2)
   assert(pplayer1 != pplayer2);
-  return pplayers_in_peace(pplayer1, pplayer2);
+  return (pplayers_in_peace(pplayer1, pplayer2) &&
!pplayers_allied(pplayer1, pplayer2));


Freeciv-dev mailing list

Reply via email to