From: Jaka K. <lyn...@us...> - 2010-11-18 09:36:37
|
gemrb: Infinity Engine emulator The branch master has been updated via a11d32125f2083dc382ff398c0349af3699613e1 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 19 +++++++++++++------ gemrb/core/Scriptable/Actor.h | 1 + 2 files changed, 14 insertions(+), 6 deletions(-) from 2d48e86c3db219c965fb081512d5efd9c24c5cd3 (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=a11d32125f2083dc382ff398c0349af3699613e1 commit a11d32125f2083dc382ff398c0349af3699613e1 Author: Jaka Kranjc <lyn...@us...> Date: Thu Nov 18 10:33:07 2010 +0100 split out Actor::SetupFistData diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index f65d57e..b3a6919 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -6118,13 +6118,9 @@ void Actor::SetUsedHelmet(const char* AnimationType) } } -void Actor::SetupFist() +// initializes the fist data the first time it is called +void Actor::SetupFistData() { - int slot = core->QuerySlot( 0 ); - assert (core->QuerySlotEffects(slot)==SLOT_EFFECT_FIST); - int row = GetBase(fiststat); - int col = GetXPLevel(false); - if (FistRows<0) { FistRows=0; AutoTable fist("fistweap"); @@ -6143,9 +6139,20 @@ void Actor::SetupFist() } } } +} + +void Actor::SetupFist() +{ + int slot = core->QuerySlot( 0 ); + assert (core->QuerySlotEffects(slot)==SLOT_EFFECT_FIST); + int row = GetBase(fiststat); + int col = GetXPLevel(false); + if (col>MAX_LEVEL) col=MAX_LEVEL; if (col<1) col=1; + SetupFistData(); + const char *ItemResRef = DefaultFist; for (int i = 0;i<FistRows;i++) { if (fistresclass[i] == row) { diff --git a/gemrb/core/Scriptable/Actor.h b/gemrb/core/Scriptable/Actor.h index 0505269..1caca86 100644 --- a/gemrb/core/Scriptable/Actor.h +++ b/gemrb/core/Scriptable/Actor.h @@ -349,6 +349,7 @@ private: bool ShouldHibernate(); void ApplyClassClab(int cls, bool remove); bool ShouldDrawCircle(); + void SetupFistData(); public: Actor(void); ~Actor(void); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |