<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17436 >
On 1/19/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
> handle_nation_select_req() always marks players previous nation
> available. This is not right when nation is not changed, but only
> leader name or sex. player_set_nation() sets nation->player correctly,
> so handle_nation_select_req() should not directly touch it at all.
Patch
- ML
diff -Nurd -X.diff_ignore freeciv/server/srv_main.c freeciv/server/srv_main.c
--- freeciv/server/srv_main.c 2007-01-13 08:20:23.000000000 +0200
+++ freeciv/server/srv_main.c 2007-01-19 20:48:48.000000000 +0200
@@ -1332,14 +1332,13 @@
Nation_type_id nation_no, bool is_male,
char *name, int city_style)
{
- struct nation_type *old_nation, *new_nation;
+ struct nation_type *new_nation;
struct player *pplayer = get_player(player_no);
if (!pplayer || !can_conn_edit_players_nation(pc, pplayer)) {
return;
}
- old_nation = pplayer->nation;
new_nation = get_nation_by_idx(nation_no);
if (new_nation != NO_NATION_SELECTED) {
@@ -1386,10 +1385,6 @@
(void) player_set_nation(pplayer, new_nation);
send_player_info_c(pplayer, game.est_connections);
-
- if (old_nation != NO_NATION_SELECTED) {
- old_nation->player = NULL;
- }
}
/****************************************************************************
_______________________________________________
Freeciv-dev mailing list
[email protected]
https://mail.gna.org/listinfo/freeciv-dev