Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: (PR#4620) Game end message
Home

[Freeciv-Dev] Re: (PR#4620) Game end message

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: ChrisK@xxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#4620) Game end message
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat, 19 Jul 2003 16:35:20 -0700
Reply-to: rt@xxxxxxxxxxxxxx

Jason Short wrote:
> [ChrisK@xxxxxxxx - Sat Jul 19 10:15:31 2003]:
> 
> 
>>CVS 18 JUL 2003 w/ various patches GTK 1
>>
>>The game end message
>>
>>Spiel endete mit einem Sieg von Wilhelm I.
>>Spiel: Das Spiel ist vorbei...
>>
>>is not shown in the F10 message window, even if the resp. option is
> 
> marked.
> 
> "Game ended in victory for %s"
> "Game: The game is over..."

notify_conn and notify_player are used instead of notify_conn_ex and 
notify_player_ex.  The attached patch fixes this for these two messages.

But there are dozens of other places where the _ex form is not used. 
The basic notify_conn() form gives the event type as E_NO_EVENT. 
Problem is it's often hard to choose an event for the messages.  IMO we 
should do so for most/all of them, but I don't want to to the design 
work (choosing new events and assigning messages to events)...

jason

? rc
Index: server/srv_main.c
===================================================================
RCS file: /home/freeciv/CVS/freeciv/server/srv_main.c,v
retrieving revision 1.131
diff -u -r1.131 srv_main.c
--- server/srv_main.c   2003/07/18 17:05:53     1.131
+++ server/srv_main.c   2003/07/19 23:30:39
@@ -234,8 +234,8 @@
 
   /* quit if only one player is left alive */
   if (alive == 1) {
-    notify_conn(&game.est_connections, 
-        _("Game ended in victory for %s"), victor->name);
+    notify_conn_ex(&game.est_connections, -1, -1, E_GAME_END,
+                  _("Game ended in victory for %s"), victor->name);
     gamelog(GAMELOG_NORMAL, _("Game ended in victory for %s"), 
         victor->name);
     gamelog(GAMELOG_TEAM, "SINGLEWINNER %s", victor->name);
@@ -1591,7 +1591,8 @@
     send_game_state(&game.game_connections, CLIENT_GAME_OVER_STATE);
     report_scores(TRUE);
     show_map_to_all();
-    notify_player(NULL, _("Game: The game is over..."));
+    notify_player_ex(NULL, -1, -1, E_GAME_END,
+                    _("Game: The game is over..."));
     gamelog(GAMELOG_NORMAL, _("The game is over!"));
     if (game.save_nturns > 0) {
       save_game_auto();

[Prev in Thread] Current Thread [Next in Thread]