From: Jens G. <fi...@us...> - 2013-03-04 21:44:36
|
gemrb: Infinity Engine emulator The branch master has been updated via d964390271c5a58efbe72b1b71ac80a68ab632e3 (commit) Summary of changes: gemrb/core/GameScript/Matching.cpp | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) from e44ea29ec059ebb69da04ac925be3f5329daecf3 (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=d964390271c5a58efbe72b1b71ac80a68ab632e3 commit d964390271c5a58efbe72b1b71ac80a68ab632e3 Author: Jens Granseuer <je...@gm...> Date: Sun Mar 3 20:07:17 2013 +0100 make sure the action/trigger owner is first in the list of targets Or things will go pear-shaped if he's standing on top of dead bodies. diff --git a/gemrb/core/GameScript/Matching.cpp b/gemrb/core/GameScript/Matching.cpp index de86482..452fa89 100644 --- a/gemrb/core/GameScript/Matching.cpp +++ b/gemrb/core/GameScript/Matching.cpp @@ -251,10 +251,15 @@ Targets *GetAllActors(Scriptable *Sender, int ga_flags) int i = map->GetActorCount(true); Targets *tgts = new Targets(); + //make sure that Sender is always first in the list, even if there + //are other (e.g. dead) targets at the same location + tgts->AddTarget(Sender, 0, ga_flags); while (i--) { Actor *ac = map->GetActor(i,true); - int dist = Distance(Sender->Pos, ac->Pos); - tgts->AddTarget((Scriptable *) ac, dist, ga_flags); + if (ac != Sender) { + int dist = Distance(Sender->Pos, ac->Pos); + tgts->AddTarget(ac, dist, ga_flags); + } } return tgts; } ----------------------------------------------------------------------- This is an automated email from the git hooks/post-receive script. -- gemrb: Infinity Engine emulator |