From: Jaka K. <lyn...@us...> - 2012-11-28 21:09:12
|
gemrb: Infinity Engine emulator The branch master has been updated via 17669a78ce2d2553c9382985e134ce1fc044e37b (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) from 62c02b71bd82a76e641401b19869c51cf674067e (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=17669a78ce2d2553c9382985e134ce1fc044e37b commit 17669a78ce2d2553c9382985e134ce1fc044e37b Author: Jaka Kranjc <lyn...@us...> Date: Wed Nov 28 22:04:32 2012 +0100 fixed regression from 80f9468 - unwanted weapon slot change caused infinite ammo among other things diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 6f85146..d4daa92 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -5841,7 +5841,9 @@ void Actor::PerformAttack(ieDword gameTime) } if (PCStats) { - CREItem *slot = inventory.GetUsedWeapon(leftorright && IsDualWielding(), wi.slot); + // make a copy of wi.slot, since GetUsedWeapon can modify it + int wislot = wi.slot; + CREItem *slot = inventory.GetUsedWeapon(leftorright && IsDualWielding(), wislot); //if slot was null, then GetCombatDetails returned false PCStats->RegisterFavourite(slot->ItemResRef, FAV_WEAPON); } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |