From: Laszlo T. <ave...@us...> - 2011-12-26 15:12:40
|
gemrb: Infinity Engine emulator The branch master has been updated via 5ced775e275fba66a28d43f128faabf9460bd6b2 (commit) Summary of changes: gemrb/core/Inventory.cpp | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) from ce5bd627528e5356d31e2d62d81246928f23be15 (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=5ced775e275fba66a28d43f128faabf9460bd6b2 commit 5ced775e275fba66a28d43f128faabf9460bd6b2 Author: Avenger <ave...@so...> Date: Mon Dec 26 16:11:50 2011 +0100 apply the effects on an equipped and loaded bow diff --git a/gemrb/core/Inventory.cpp b/gemrb/core/Inventory.cpp index 669c009..10abd1a 100644 --- a/gemrb/core/Inventory.cpp +++ b/gemrb/core/Inventory.cpp @@ -276,6 +276,7 @@ void Inventory::AddSlotEffects(ieDword index) EffectQueue *eqfx = itm->GetEffectBlock(Owner, Owner->Pos, -1, index, 0); gamedata->FreeItem( itm, slot->ItemResRef, false ); +print("Added equipping effects of slot: %d\n", index); Owner->RefreshEffects(eqfx); //call gui for possible paperdoll animation changes if (Owner->InParty) { @@ -287,6 +288,7 @@ void Inventory::AddSlotEffects(ieDword index) //is stored in them void Inventory::RemoveSlotEffects(ieDword index) { +print("Removed equipping effects of slot: %d\n", index); Owner->fxqueue.RemoveEquippingEffects(index); Owner->RefreshEffects(NULL); //call gui for possible paperdoll animation changes @@ -978,7 +980,13 @@ bool Inventory::EquipItem(unsigned int slot) if (slot != IW_NO_EQUIPPED) { Owner->SetupQuickSlot(ACT_WEAPON1+weaponslot, slot+SLOT_MELEE, EquippedHeader); } - effect = 0; // SetEquippedSlot will already call AddSlotEffects + //don't clear effect in case of a launcher, we need to find it and add its effects too + //slot is 'negative' for launchers + if ((int) slot>=0) { + effect = 0; // SetEquippedSlot will already call AddSlotEffects + } else { + effect = SLOT_EFFECT_MISSILE; + } UpdateWeaponAnimation(); } break; ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |