Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Development

Reply
 
Thread Tools Display Modes
Old October 14, 2016, 16:07   #1
t4nk
Adept
 
Join Date: May 2016
Posts: 249
t4nk is on a distinguished road
Player's options are not restored (from savefile) when creating a new chars

Now options are in struct player, which gets memset in player_init() (player-birth.c):
Code:
    /* Wipe the player */
    memset(p, 0, sizeof(struct player));
So all options are reset to 0. Then options_init_defaults() is called (also from player_init()). Note that player_init() is called after trying to load savefile (ui-game.c):
Code:
    /* Try loading */
    if (file_exists(savefile) && !savefile_load(savefile, arg_wizard))
        quit("Broken savefile");

    /* No living character loaded */
    if (player->is_dead || new_game) {
        character_generated = false;
        textui_do_birth();
    }
textui_do_birth() calls player_init() via do_cmd_birth_reset().
Is it working as designed? I'd prefer the game to remember my options (roguelike keyset, etc), like it did before, even if I'm creating a new char.
t4nk is offline   Reply With Quote
Old October 15, 2016, 16:18   #2
Carnivean
Swordsman
 
Join Date: Sep 2013
Posts: 476
Carnivean is on a distinguished road
New characters could be for a new user, so the slate is left clean. Descendants of an existing character get the options for the ancestor's player.
Carnivean is offline   Reply With Quote
Old October 16, 2016, 00:24   #3
takkaria
Veteran
 
takkaria's Avatar
 
Join Date: Apr 2007
Posts: 1,827
Donated: $40
takkaria is on a distinguished road
Thanks, I've submitted a pull request that fixes this behaviour now.
__________________
"Physician, heal thyself."
takkaria is offline   Reply With Quote
Old October 16, 2016, 00:44   #4
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 52
Posts: 6,660
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by takkaria View Post
Thanks, I've submitted a pull request that fixes this behaviour now.
...aaaand it's in the latest nightly build.
__________________
One Ring to rule them all, One Ring to find them,
One Ring to bring them all and in the darkness bind them.
Nick is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need advice for my chars sam_snowy Vanilla 24 August 25, 2014 04:11
3.5.0 crash, accented chars in subwindows Atanvarno Vanilla 0 March 2, 2014 20:43
Creating an Angband Variant OOD Town drunk Development 11 May 2, 2013 00:50
Any way to persist squelch settings for new chars? awldune Vanilla 14 March 17, 2010 17:53
Creating maps and other questions. PaulBlay ToME 1 February 5, 2009 16:45


All times are GMT +1. The time now is 19:40.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2017, vBulletin Solutions, Inc.