Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2000:
[Freeciv-Dev] move before_end_year() before summon_barbarians() (PR#273)
Home

[Freeciv-Dev] move before_end_year() before summon_barbarians() (PR#273)

[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] move before_end_year() before summon_barbarians() (PR#273)
From: David Pfitzner <dwp@xxxxxxxxxxxxxx>
Date: Fri, 25 Feb 2000 03:40:34 -0800 (PST)

I noticed that messages about random barbarian uprisings get 
lost from the messages window, because summon_barbarians()
occurs on the wrong side of before_end_year().  This patch
moves before_end_year() and adds a longer comment.

But its hard to test this patch, because even with maximum
barbarians and hard skill level, I hardly ever see such messages 
(using also Popup for Barbarian Uprisings in Message Options, 
to make sure I see them).  I guess because I mostly see sea 
barbarians, coming from unknown squares so I don't get the 
message.  (Another possible case is if I'm not the "real" 
victim, but that would seem less often.)

This seems a bit of a problem, in terms of not getting a 
warning even when the barbarians do then come within visible 
range, but I'm not sure how to fix.  Maybe the client could
generate a message when a barbarian unit first comes 
"on-screen"?  ("Barbarians sighted near ...")

-- David

diff -u -r --exclude-from exclude freeciv-cvs/server/civserver.c 
fc-adv/server/civserver.c
--- freeciv-cvs/server/civserver.c      Thu Feb  3 13:00:26 2000
+++ fc-adv/server/civserver.c   Fri Feb 25 22:06:07 2000
@@ -462,6 +462,13 @@
     
     for(i=0;i<game.nplayers;i++)
       connection_do_buffer(game.players[i].conn);
+    
+    before_end_year();
+    /* This empties the client Messages window; put this before
+       everything else below, since otherwise any messages from
+       the following parts get wiped out before the user gets a
+       chance to see them. */
+    
     freelog(LOG_DEBUG, "Season of native unrests");
     summon_barbarians(); /* wild guess really, no idea where to put it, but
                             I want to give them chance to move their units */
@@ -469,7 +476,6 @@
     auto_settlers(); /* moved this after ai_start_turn for efficiency -- Syela 
*/
     /* moved after sniff_packets for even more efficiency.
        What a guy I am. -- Syela */
-    before_end_year(); /* resetting David P's message window -- Syela */
     /* and now, we must manage our remaining units BEFORE the cities that are
        empty get to refresh and defend themselves.  How totally stupid. */
     ai_start_turn(); /* Misleading name for manage_units -- Syela */

[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] move before_end_year() before summon_barbarians() (PR#273), David Pfitzner <=