From: Jaka K. <lyn...@us...> - 2011-07-15 14:07:52
|
gemrb: Infinity Engine emulator The branch master has been updated via 439d7888bb35820edc3300341b2c4c5318d2c1a6 (commit) Summary of changes: gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 12 ++++++++++++ 1 files changed, 12 insertions(+), 0 deletions(-) from f7c244ca8494ba1a4788f855e4a337724eb23eaa (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=439d7888bb35820edc3300341b2c4c5318d2c1a6 commit 439d7888bb35820edc3300341b2c4c5318d2c1a6 Author: Jaka Kranjc <lyn...@us...> Date: Fri Jul 15 16:05:52 2011 +0200 fx_cast_spell_on_condition: added a range check to the on-hit case fixes fireshield dealing damage out of its 5' range diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index 67b33cb..ff5422c 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -5471,6 +5471,18 @@ int fx_cast_spell_on_condition (Scriptable* Owner, Actor* target, Effect* fx) if (condition) { // The trigger was evaluated as true, cast the spells now. // TODO: fail remaining spells if an earlier one fails? + // Actually, atleast fire shields also have a range check + if (fx->Parameter2 == COND_GOTHIT) { + Spell* spl = gamedata->GetSpell(fx->Source); + if (!spl) { + print("fx_cast_spell_on_condition: Spell couldn't be found:%.8s.\n", fx->Source); + return FX_NOT_APPLIED; + } + unsigned int dist = spl->GetCastingDistance(target); + if (PersonalDistance(target, actor) > dist) { + return FX_APPLIED; + } + } core->ApplySpell(fx->Resource, actor, Owner, fx->Power); core->ApplySpell(fx->Resource2, actor, Owner, fx->Power); core->ApplySpell(fx->Resource3, actor, Owner, fx->Power); ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |