<URL: http://bugs.freeciv.org/Ticket/Display.html?id=39745 >

Kinda strange, if you remove then create a player the team gets reset
but if you disconnect then a new player connects, it does not get reset.

But I wonder if this bug could hit other fields in the player structure
too.  What about re-initting the whole player?  If so this could
possibly apply to other branches too (team issue should only affect 2.0
I believe).


Index: common/game.c
--- common/game.c	(revision 14856)
+++ common/game.c	(working copy)
@@ -498,11 +498,7 @@
   /* a bit of cleanup to keep connections sane */
-  game.players[game.nplayers].is_connected = FALSE;
-  game.players[game.nplayers].was_created = FALSE;
-  game.players[game.nplayers].ai.control = FALSE;
-  sz_strlcpy(game.players[game.nplayers].name, ANON_PLAYER_NAME);
-  sz_strlcpy(game.players[game.nplayers].username, ANON_USER_NAME);
+  player_init(&game.players[game.nplayers]);
Freeciv-dev mailing list

Reply via email to