[3.5] Turn count bug (player history)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • PowerWyrm
    Prophet
    • Apr 2008
    • 2986

    [3.5] Turn count bug (player history)

    Playing the v3.5 competition character, I've found that each time you save the game, the turn count is reset in the player history screen.

    Seems related to the fact that p_ptr->total_energy / 100 is stored in the turn count now instead of the actual turn.

    In load.c (rd_history):

    Code:
    		rd_u16b(&type);
    		rd_s32b(&turnno);
    		rd_s16b(&dlev);
    		rd_s16b(&clev);
    		rd_byte(&art_name);
    		rd_string(text, sizeof(text));
    		
    		history_add_full(type, &a_info[art_name], dlev, clev, turnno, text);
    In history.c (history_add_full):

    Code:
    history_list[history_ctr].turn = p_ptr->total_energy / 100;
    In history.c (history_add):

    Code:
    return history_add_full(type, artifact, p_ptr->depth, p_ptr->lev, turn, event);
    I don't see why the "turnno" parameter is not used. The fix should be pretty trivial:

    - in history.c (history_add_full):

    Code:
    history_list[history_ctr].turn = turnno;
    - in history.c (history_add):

    Code:
    return history_add_full(type, artifact, p_ptr->depth, p_ptr->lev, p_ptr->total_energy / 100, event);
    PWMAngband variant maintainer - check https://github.com/draconisPW/PWMAngband (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
  • fizzix
    Prophet
    • Aug 2009
    • 3025

    #2
    Ugh, I seem to recall this bug in the past. I wonder if this was a reversion.

    Comment

    • Nick
      Vanilla maintainer
      • Apr 2007
      • 9637

      #3
      Originally posted by fizzix
      Ugh, I seem to recall this bug in the past. I wonder if this was a reversion.
      I guess it's the null reversion - this bug was first discovered in competition 151, which was the first 3.5 comp. Seems like forever ago...
      One for the Dark Lord on his dark throne
      In the Land of Mordor where the Shadows lie.

      Comment

      • debo
        Veteran
        • Oct 2011
        • 2402

        #4
        Originally posted by Nick
        I guess it's the null reversion - this bug was first discovered in competition 151, which was the first 3.5 comp. Seems like forever ago...
        Not when you have to come up with the comps it doesn't!!!
        Glaurung, Father of the Dragons says, 'You cannot avoid the ballyhack.'

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎