Angband Forums

Angband Forums (http://angband.oook.cz/forum/index.php)
-   Vanilla (http://angband.oook.cz/forum/forumdisplay.php?f=3)
-   -   [3.5] Turn count bug (player history) (http://angband.oook.cz/forum/showthread.php?t=6765)

PowerWyrm May 14, 2014 13:14

[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);

fizzix May 14, 2014 13:28

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

Nick May 14, 2014 14:28

Quote:

Originally Posted by fizzix (Post 92562)
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...

debo May 14, 2014 15:03

Quote:

Originally Posted by Nick (Post 92564)
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!!! :)


All times are GMT +1. The time now is 13:06.

Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.