<URL: http://bugs.freeciv.org/Ticket/Display.html?id=17436 >
On 1/19/07, Marko Lindqvist <[EMAIL PROTECTED]> wrote:
> 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
S2_0 version
- 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:29.000000000 +0200
+++ freeciv/server/srv_main.c 2007-01-24 16:25:16.000000000 +0200
@@ -1304,7 +1304,7 @@
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 (server_state != PRE_GAME_STATE || !pplayer) {
@@ -1315,7 +1315,6 @@
return;
}
- old_nation = pplayer->nation;
new_nation = get_nation_by_idx(nation_no);
if (new_nation != NO_NATION_SELECTED) {
@@ -1362,10 +1361,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