From: Alyssa M. <fu...@us...> - 2010-11-18 09:23:29
|
gemrb: Infinity Engine emulator The branch master has been updated via 2d48e86c3db219c965fb081512d5efd9c24c5cd3 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 9 ++++++--- 1 files changed, 6 insertions(+), 3 deletions(-) from 2bc7132153186cc543fe8c38a6b6d7613cda730f (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=2d48e86c3db219c965fb081512d5efd9c24c5cd3 commit 2d48e86c3db219c965fb081512d5efd9c24c5cd3 Author: Alyssa Milburn <fu...@fu...> Date: Thu Nov 18 10:22:38 2010 +0100 try another fix for SetupFist diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index b6f7457..f65d57e 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -95,6 +95,7 @@ int *wmlevels[20]; typedef ieResRef FistResType[MAX_LEVEL+1]; static FistResType *fistres = NULL; +static int *fistresclass = NULL; static ieResRef DefaultFist = {"FIST"}; static int VCMap[VCONST_COUNT]; @@ -286,6 +287,8 @@ void ReleaseMemoryActor() if (fistres) { delete [] fistres; fistres = NULL; + delete [] fistresclass; + fistresclass = NULL; } if (itemuse) { @@ -6121,7 +6124,6 @@ void Actor::SetupFist() assert (core->QuerySlotEffects(slot)==SLOT_EFFECT_FIST); int row = GetBase(fiststat); int col = GetXPLevel(false); - int classid = -1; if (FistRows<0) { FistRows=0; @@ -6131,12 +6133,13 @@ void Actor::SetupFist() strnlwrcpy( DefaultFist, fist->QueryField( (unsigned int) -1), 8); FistRows = fist->GetRowCount(); fistres = new FistResType[FistRows]; + fistresclass = new int[FistRows]; for (int i=0;i<FistRows;i++) { int maxcol = fist->GetColumnCount(i)-1; for (int cols = 0;cols<MAX_LEVEL;cols++) { strnlwrcpy( fistres[i][cols], fist->QueryField( i, cols>maxcol?maxcol:cols ), 8); } - classid = atoi(fist->GetRowName(i)); + fistresclass[i] = atoi(fist->GetRowName(i)); } } } @@ -6145,7 +6148,7 @@ void Actor::SetupFist() const char *ItemResRef = DefaultFist; for (int i = 0;i<FistRows;i++) { - if (classid == row) { + if (fistresclass[i] == row) { ItemResRef = fistres[i][col]; } } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |