From: Brad A. <br...@us...> - 2013-01-07 04:59:29
|
gemrb: Infinity Engine emulator The branch master has been updated via 830d80272ab45951d4940b33df7d824e7b3ef367 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 6 +++--- 1 files changed, 3 insertions(+), 3 deletions(-) from fe7408bf285d53a6c181ae53f563a84107d30f19 (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- http://gemrb.git.sourceforge.net/git/gitweb.cgi?p=gemrb/gemrb;a=commitdiff;h=830d80272ab45951d4940b33df7d824e7b3ef367 commit 830d80272ab45951d4940b33df7d824e7b3ef367 Author: Brad Allred <bra...@me...> Date: Sun Jan 6 21:57:46 2013 -0700 move variables into the scope they are used in. silence more anylizer warnings diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 59c740d..2516b50 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -2984,8 +2984,6 @@ void Actor::RefreshHP() { // this is wrong for dual-classed (so we override it later) // and sometimes marginally wrong for multi-classed (but we usually round the average up) int bonlevel = GetXPLevel(true); - int oldlevel, oldbonus; - oldlevel = oldbonus = 0; ieDword bonindex = BaseStats[IE_CLASS]-1; //we must limit the levels to the max allowable @@ -2997,8 +2995,10 @@ void Actor::RefreshHP() { } } if (IsDualClassed()) { + int oldbonus = 0; + // just the old consititution bonus - oldlevel = IsDualSwap() ? BaseStats[IE_LEVEL] : BaseStats[IE_LEVEL2]; + int oldlevel = IsDualSwap() ? BaseStats[IE_LEVEL] : BaseStats[IE_LEVEL2]; bonlevel = IsDualSwap() ? BaseStats[IE_LEVEL2] : BaseStats[IE_LEVEL]; oldlevel = (oldlevel > maxLevelForHpRoll[bonindex]) ? maxLevelForHpRoll[bonindex] : oldlevel; // give the bonus only for the levels where there were actually rolls ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |