From: Holger Schemel Date: Sat, 24 Oct 2020 22:10:21 +0000 (+0200) Subject: added request to use current setup values for newly created users X-Git-Tag: 4.2.1.0~9 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=1bc4b3ac4a6de114e33e0e84e632eeace8f9ebb4;p=rocksndiamonds.git added request to use current setup values for newly created users --- diff --git a/src/screens.c b/src/screens.c index e5741bc0..6f1e7f42 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4102,6 +4102,7 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos, { boolean reset_setup = strEqual(name, ""); boolean remove_user = strEqual(name, EMPTY_PLAYER_NAME); + boolean create_user = strEqual(type_name_last, EMPTY_PLAYER_NAME); if (!changed) strcpy(name, type_name_last); @@ -4128,8 +4129,10 @@ static void setTypeNameValues(char *name, struct TextPosInfo *pos, // temporarily change active user to edited user user.nr = type_name_nr; - // load setup of edited user - LoadSetup(); + // load setup of edited user (unless creating user with current setup) + if (!create_user || + !Request("Use current setup values for the new player?", REQ_ASK)) + LoadSetup(); } // change name of edited user in setup structure