[Freeciv-Dev] (PR#15851) allow a player to change leader
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://bugs.freeciv.org/Ticket/Display.html?id=15851 >
This patch fixes a bug preventing a player from changing their leader in
pregame:
* Open nation dialog.
* Pick USA, with leader George Washington.
* Open nation dialog.
* Pick USA, with leader Abraham Lincoln.
The second change is discarded because of a bug in is_allowed_player_name.
-jason
Index: server/srv_main.c
===================================================================
--- server/srv_main.c (revision 11759)
+++ server/srv_main.c (working copy)
@@ -1177,6 +1177,9 @@
/* Any name already taken is not allowed. */
players_iterate(other_player) {
+ if (other_player == pplayer) {
+ continue;
+ }
if (other_player->nation == nation) {
if (error_buf) {
my_snprintf(error_buf, bufsz, _("That nation is already in use."));
@@ -1192,8 +1195,7 @@
* times (for server commands etc), including during nation
* allocation phase.
*/
- if (other_player->player_no != pplayer->player_no
- && mystrcasecmp(other_player->name, name) == 0) {
+ if (mystrcasecmp(other_player->name, name) == 0) {
if (error_buf) {
my_snprintf(error_buf, bufsz,
_("Another player already has the name '%s'. Please "
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] (PR#15851) allow a player to change leader,
Jason Short <=
|
|