![]() |
#1 |
Knight
Join Date: May 2008
Location: Saratoga, California (in the midst of Silicon Valley)
Posts: 515
![]() |
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. |
![]() |
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | |
Display Modes | |
|
|
![]() |
||||
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 rephial.org? | 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 |