Go Back   Angband Forums > Angband > Variants

Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old July 16, 2011, 02:41   #1
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 515
bron is on a distinguished road
Oangband bug fix

So I was playing in the recent Oangband Shadow Fairy Mage competition, and I was annoyed by a bug I kept hitting: if I was a full mana, and then saved the game (cntrl-X), when I restored it I had less than full mana. It annoyed me enough that I tracked it down: in update_stuff() in file xtra1.c, the call to calc_mana() comes *before* the call to calc_specialty(). This means that the very first time calc_mana() is called after a savefile reload, the value of p_ptr->specialties_allowed has not yet been updated and so is still zero. This in turn means that the bonus for having the "Clarity" special ability isn't being counted the first time that calc_mana() is called.

The fix that I chose is simple: I just moved the block of code that checks for and calls calc_speciality to be the first such block in the update_stuff() routine.
bron is offline   Reply With Quote

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
Sangband wall fix for windows vista Malak Darkhunter Variants 41 May 10, 2010 20:35
a fluke or an unfixed fix 3.1.2 yyrkoon Vanilla 11 February 20, 2010 00:20
Little (and quick-fix) 3.1.0 issues ClaytonAguiar Vanilla 7 June 23, 2009 02:43
Is someone going to fix ChodTheWacko Vanilla 3 March 18, 2009 22:40
Any way to fix the Esc problem for Linux? TJA Vanilla 6 August 17, 2007 14:42

All times are GMT +1. The time now is 17:28.

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