From: Holger Schemel Date: Wed, 29 Sep 2021 22:54:25 +0000 (+0200) Subject: swapped condition logic to improve code readability X-Git-Tag: 4.3.0.0~25 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=e62173f0d73ba575738b04300f5408b2dfdc3188;p=rocksndiamonds.git swapped condition logic to improve code readability --- diff --git a/src/screens.c b/src/screens.c index 0cb8a2b0..fb6b4e76 100644 --- a/src/screens.c +++ b/src/screens.c @@ -4356,12 +4356,17 @@ 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 (unless creating user with current setup) - if (!create_user || - !Request("Use current setup values for the new player?", REQ_ASK)) - LoadSetup(); - else + if (create_user && + Request("Use current setup values for the new player?", REQ_ASK)) + { + // use current setup values for new user, but create new player UUID setup.player_uuid = getStringCopy(getUUID()); + } + else + { + // load setup for existing user (or start with defaults for new user) + LoadSetup(); + } } char *setup_filename = getSetupFilename();