[Freeciv-Dev] (PR#4200) two bugfixes to intelligence
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients:; |
Subject: |
[Freeciv-Dev] (PR#4200) two bugfixes to intelligence |
From: |
"Per I. Mathisen" <per@xxxxxxxxxxx> |
Date: |
Sat, 10 May 2003 12:31:33 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
These are two fixes to intelligence dialog code in the server.
The first sends A_NONE instead of A_UNSET for the tech a player is
researching if the intelligencing player does not know what it is. This
way the clients will not core if they try to display this information
(none do at present though).
The second correctly updates the contact information in a few cases where
it is now erronously not updated (in a pathetic attempt to save CPU
cycles).
I intend to commit these two fixes ASAP, as a more thorough intelligence
dialog patch is in the making and depend on them.
- Per
Index: server/plrhand.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/plrhand.c,v
retrieving revision 1.271
diff -u -r1.271 plrhand.c
--- server/plrhand.c 10 May 2003 19:20:16 -0000 1.271
+++ server/plrhand.c 10 May 2003 19:26:28 -0000
@@ -1205,7 +1203,7 @@
packet->luxury = 0;
packet->bulbs_researched= 0;
packet->techs_researched= 0;
- packet->researching = A_UNSET;
+ packet->researching = A_NONE;
packet->future_tech = 0;
packet->revolution = 0;
@@ -1345,6 +1343,8 @@
|| is_barbarian(pplayer1) || is_barbarian(pplayer2)) {
return;
}
+ pplayer1->diplstates[player2].contact_turns_left = game.contactturns;
+ pplayer2->diplstates[player1].contact_turns_left = game.contactturns;
/* FIXME: Always declaring war for the AI is a kludge until AI
diplomacy is implemented. */
@@ -1367,8 +1367,6 @@
|| player_has_embassy(pplayer2, pplayer1)) {
return; /* Avoid sending too much info over the network */
}
- pplayer1->diplstates[player2].contact_turns_left = game.contactturns;
- pplayer2->diplstates[player1].contact_turns_left = game.contactturns;
send_player_info(pplayer1, pplayer1);
send_player_info(pplayer2, pplayer2);
}
- [Freeciv-Dev] (PR#4200) two bugfixes to intelligence,
Per I. Mathisen <=
|
|