projects
/
rocksndiamonds.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9a42869
)
swapped condition logic to improve code readability
author
Holger Schemel
<info@artsoft.org>
Wed, 29 Sep 2021 22:54:25 +0000
(
00:54
+0200)
committer
Holger Schemel
<info@artsoft.org>
Wed, 29 Sep 2021 22:54:25 +0000
(
00:54
+0200)
src/screens.c
patch
|
blob
|
history
diff --git
a/src/screens.c
b/src/screens.c
index 0cb8a2b017ab8d05e10f0f757a353c17d4d158ab..fb6b4e76976952219a1015710389d65fe6dbb38a 100644
(file)
--- 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;
// 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());
setup.player_uuid = getStringCopy(getUUID());
+ }
+ else
+ {
+ // load setup for existing user (or start with defaults for new user)
+ LoadSetup();
+ }
}
char *setup_filename = getSetupFilename();
}
char *setup_filename = getSetupFilename();