Angband.oook.cz
Angband.oook.cz
AboutVariantsLadderForumCompetitionComicScreenshotsFunniesLinks

Go Back   Angband Forums > Angband > Vanilla

Reply
 
Thread Tools Display Modes
Old May 14, 2014, 13:14   #1
PowerWyrm
Prophet
 
PowerWyrm's Avatar
 
Join Date: Apr 2008
Posts: 2,586
PowerWyrm is on a distinguished road
[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 http://powerwyrm.monsite-orange.fr (or http://www.mangband.org/forum/viewforum.php?f=9) to learn more about this new variant!
PowerWyrm is offline   Reply With Quote
Old May 14, 2014, 13:28   #2
fizzix
Prophet
 
Join Date: Aug 2009
Location: Madison, Wisconsin, US
Posts: 3,002
fizzix is on a distinguished road
Ugh, I seem to recall this bug in the past. I wonder if this was a reversion.
fizzix is offline   Reply With Quote
Old May 14, 2014, 14:28   #3
Nick
Vanilla maintainer
 
Nick's Avatar
 
Join Date: Apr 2007
Location: Canberra, Australia
Age: 53
Posts: 7,585
Donated: $60
Nick is on a distinguished road
Quote:
Originally Posted by fizzix View Post
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.
Nick is offline   Reply With Quote
Old May 14, 2014, 15:03   #4
debo
Veteran
 
debo's Avatar
 
Join Date: Oct 2011
Location: Toronto, Canada
Posts: 2,354
debo is on a distinguished road
Quote:
Originally Posted by Nick View Post
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.'
debo 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
Bug with "Turn" in the "Player History" dump bron Vanilla 3 January 17, 2014 16:35
Bug: saving and quitting takes a turn MarvinPA Sil 5 November 11, 2013 14:12
possible bug in char history - r2025 bebo Vanilla 4 August 4, 2010 18:04
Small bug with Player History and drained levels. Twilight Development 0 July 1, 2010 10:54
feature request: add player history to char dump bebo Vanilla 4 February 26, 2009 19:11


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


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