From: Laszlo T. <ave...@us...> - 2012-04-09 14:30:18
|
gemrb: Infinity Engine emulator The branch master has been updated via 7d538ba8538026cb43c76599dc7b627f0436eb26 (commit) Summary of changes: gemrb/core/Scriptable/Actor.cpp | 22 ++++++++-------------- gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 4 ++-- 2 files changed, 10 insertions(+), 16 deletions(-) from f9d414c951b96c2d0214196aeb73e020a445447a (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=7d538ba8538026cb43c76599dc7b627f0436eb26 commit 7d538ba8538026cb43c76599dc7b627f0436eb26 Author: Avenger <ave...@so...> Date: Mon Apr 9 16:29:33 2012 +0200 moved the vanish on damage of projected image into CheckPuppet diff --git a/gemrb/core/Scriptable/Actor.cpp b/gemrb/core/Scriptable/Actor.cpp index 858c76d..1e9fa78 100644 --- a/gemrb/core/Scriptable/Actor.cpp +++ b/gemrb/core/Scriptable/Actor.cpp @@ -2498,18 +2498,23 @@ void Actor::CheckPuppet(Actor *puppet, ieDword type) if (!puppet) return; if (puppet->Modified[IE_STATE_ID]&STATE_DEAD) return; - Modified[IE_PUPPETMASTERTYPE] = type; - Modified[IE_PUPPETID] = puppet->GetGlobalID(); switch(type) { case 1: Modified[IE_STATE_ID]|=state_invisible; break; case 2: + if (InterruptCasting) { + // dispel the projected image if there is any + puppet->DestroySelf(); + return; + } Modified[IE_HELD]=1; AddPortraitIcon(PI_PROJIMAGE); Modified[IE_STATE_ID]|=STATE_HELPLESS; break; } + Modified[IE_PUPPETTYPE] = type; + Modified[IE_PUPPETID] = puppet->GetGlobalID(); } static EffectRef fx_set_charmed_state_ref = { "State:Charmed", -1 }; @@ -3345,18 +3350,7 @@ void Actor::GetHit() SetStance( IE_ANI_DAMAGE ); } VerbalConstant(VB_DAMAGE, 1 ); - // dispel the projected image if there is any - if (BaseStats[IE_PUPPETMASTERTYPE] == 2) { - Actor *puppet = core->GetGame()->GetActorByGlobalID(Modified[IE_PUPPETID]); - if (puppet) { - // now destroy it - puppet->DestroySelf(); - } else { - Log(ERROR, "Actor", "Puppet lookup failed! Already gone?"); - } - BaseStats[IE_PUPPETID] = 0; - BaseStats[IE_PUPPETMASTERTYPE] = 0; - } + if (Modified[IE_STATE_ID]&STATE_SLEEP) { if (Modified[IE_EXTSTATE_ID]&EXTSTATE_NO_WAKEUP) { return; diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 0ee4734..92911ff 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -6071,11 +6071,11 @@ int fx_puppet_marker (Scriptable* /*Owner*/, Actor* target, Effect* fx) target->DestroySelf(); return FX_NOT_APPLIED; } - STAT_SET (IE_PUPPETTYPE, fx->Parameter2); + STAT_SET (IE_PUPPETMASTERTYPE, fx->Parameter2); STAT_SET (IE_PUPPETMASTERID, fx->Parameter1); //These will be seen in PrevStats after an update in Master master->SetStat(IE_PUPPETID, target->GetGlobalID(), 0); - master->SetStat(IE_PUPPETMASTERTYPE, fx->Parameter2, 0); + master->SetStat(IE_PUPPETTYPE, fx->Parameter2, 0); return FX_APPLIED; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |