Complete.Org: Mailing Lists: Archives: freeciv-dev: June 1999:
[Freeciv-Dev] embassies with dead civilizations persist (PR#38)
Home

[Freeciv-Dev] embassies with dead civilizations persist (PR#38)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc: bugs@xxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] embassies with dead civilizations persist (PR#38)
From: dwp@xxxxxxxxxxxxxx
Date: Fri, 25 Jun 1999 06:01:57 -0700 (PDT)

This is a multi-part message in MIME format.

--_----------=_93031709039320
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

In Debian bug #39650, Chris Lawrence <lawrencc@xxxxxxxxxx> wrote:

> Version: 1.8.0+cvs19990610+cvs19990614
> Severity: wishlist
>
> If you have established an embassy with a civilization, after it's
> been wiped out you still can bring up the embassy information window
> (which is full of bogus info).
> 
> I suspect the change needs to be made in
> server/plrhand.c::update_player_aliveness(), but I haven't figured out
> enough of the civ code to make a patch myself.

I agree you probably shouldn't be able to get intelligence reports
on dead civilizations, though I think the info isn't really bogus,
just the last information that was applicable before that civ died.
(So maybe of historical interest.)

Anyway, this patch turns of such reports.
(Client side only; both clients)

Regards,
-- David

--_----------=_93031709039320
Content-Disposition: inline; filename="no_intel_rip.diff"
Content-Type: text/plain; name="no_intel_rip.diff"
Content-Transfer-Encoding: 7bit

diff -u -r --exclude-from exclude freeciv-cvs/client/gui-gtk/plrdlg.c 
freeciv-mod/client/gui-gtk/plrdlg.c
--- freeciv-cvs/client/gui-gtk/plrdlg.c Sat Jun 12 17:40:05 1999
+++ freeciv-mod/client/gui-gtk/plrdlg.c Fri Jun 25 23:18:17 1999
@@ -198,14 +198,15 @@
 **************************************************************************/
 void players_list_callback(GtkWidget *w, gint row, gint column)
 {
-    if(game.players[row].spaceship.state != SSHIP_NONE)
+  struct player *pplayer = &game.players[row];
+  
+    if(pplayer->spaceship.state != SSHIP_NONE)
       gtk_widget_set_sensitive(players_sship_command, TRUE);
     else
       gtk_widget_set_sensitive(players_sship_command, FALSE);
 
-    if(player_has_embassy(game.player_ptr, &game.players[row])) {
-      if(game.players[row].is_connected &&
-        game.players[row].is_alive)
+    if(pplayer->is_alive && player_has_embassy(game.player_ptr, pplayer)) {
+      if(pplayer->is_connected)
        gtk_widget_set_sensitive(players_meet_command, TRUE);
       else
        gtk_widget_set_sensitive(players_meet_command, FALSE);
diff -u -r --exclude-from exclude freeciv-cvs/client/gui-xaw/plrdlg.c 
freeciv-mod/client/gui-xaw/plrdlg.c
--- freeciv-cvs/client/gui-xaw/plrdlg.c Sat Jun 12 17:40:08 1999
+++ freeciv-mod/client/gui-xaw/plrdlg.c Fri Jun 25 23:17:48 1999
@@ -214,14 +214,15 @@
   ret=XawListShowCurrent(players_list);
 
   if(ret->list_index!=XAW_LIST_NONE) {
-    if(game.players[ret->list_index].spaceship.state != SSHIP_NONE)
+    struct player *pplayer = &game.players[ret->list_index];
+    
+    if(pplayer->spaceship.state != SSHIP_NONE)
       XtSetSensitive(players_sship_command, TRUE);
     else
       XtSetSensitive(players_sship_command, FALSE);
 
-    if(player_has_embassy(game.player_ptr, &game.players[ret->list_index])) {
-      if(game.players[ret->list_index].is_connected &&
-        game.players[ret->list_index].is_alive)
+    if(pplayer->is_alive && player_has_embassy(game.player_ptr, pplayer)) {
+      if(pplayer->is_connected)
        XtSetSensitive(players_meet_command, TRUE);
       else
        XtSetSensitive(players_meet_command, FALSE);

--_----------=_93031709039320--




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] embassies with dead civilizations persist (PR#38), dwp <=