<URL: http://bugs.freeciv.org/Ticket/Display.html?id=40254 >
Improved the previous version of this patch by removing a redundant name copy and adding a comment explaining the purpose of the added code. ---------------------------------------------------------------------- 見つけられてしまった。なんと大変なこと!
diff --git a/server/connecthand.c b/server/connecthand.c index 9d17dbd..7bd7090 100644 --- a/server/connecthand.c +++ b/server/connecthand.c @@ -493,6 +493,14 @@ bool attach_connection_to_player(struct connection *pconn, sz_strlcpy(pplayer->username, pconn->username); pplayer->user_turns = 0; /* reset for a new user */ pplayer->is_connected = TRUE; + + /* If we are attached to a player in pregame from + * find_uncontrolled_player above, then that player + * will be an AI created by aifill. So turn off AI + * mode if it is still on. */ + if (server_state() == S_S_INITIAL && pplayer->ai.control) { + pplayer->ai.control = FALSE; + } } pconn->observer = observing;
_______________________________________________ Freeciv-dev mailing list Freeciv-dev@gna.org https://mail.gna.org/listinfo/freeciv-dev