From: Laszlo T. <ave...@us...> - 2012-01-20 22:46:02
|
gemrb: Infinity Engine emulator The branch master has been updated via d39bd96d786f7213c05b60819cf0163dc90e2165 (commit) Summary of changes: gemrb/plugins/FXOpcodes/FXOpcodes.cpp | 13 ++++++++++--- 1 files changed, 10 insertions(+), 3 deletions(-) from a96ca19e8b86d3458126ddde549b235bed32bfb3 (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=d39bd96d786f7213c05b60819cf0163dc90e2165 commit d39bd96d786f7213c05b60819cf0163dc90e2165 Author: Avenger <ave...@so...> Date: Fri Jan 20 23:45:28 2012 +0100 hardened some effects using current area diff --git a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp index a4a7ae7..94fe19c 100644 --- a/gemrb/plugins/FXOpcodes/FXOpcodes.cpp +++ b/gemrb/plugins/FXOpcodes/FXOpcodes.cpp @@ -3333,8 +3333,7 @@ int fx_reveal_area (Scriptable* /*Owner*/, Actor* target, Effect* fx) if (target) { map = target->GetCurrentArea(); - } - else { + } else { map = core->GetGame()->GetCurrentArea(); } if (!map) { @@ -4553,7 +4552,11 @@ int fx_remove_creature (Scriptable* /*Owner*/, Actor* target, Effect* fx) Actor *actor = target; if (fx->Resource[0]) { - actor = map->GetActorByResource(fx->Resource); + if (map) { + actor = map->GetActorByResource(fx->Resource); + } else { + actor = NULL; + } } if (actor) { @@ -4868,6 +4871,8 @@ Actor *GetFamiliar(Scriptable *Owner, Actor *target, Effect *fx, ieResRef resour } Map *map = target->GetCurrentArea(); + if (!map) return NULL; + map->AddActor(fam); Point p(fx->PosX, fx->PosY); fam->SetPosition(p, true, 0); @@ -5665,6 +5670,8 @@ int fx_cast_spell_on_condition (Scriptable* Owner, Actor* target, Effect* fx) // get the actor to cast spells at Actor *actor = NULL; Map *map = target->GetCurrentArea(); + if (!map) return FX_APPLIED; + switch (fx->Parameter1) { case 0: // Myself ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |