From fe20ae0c241274ed1553e03cde7778c69434f221 Mon Sep 17 00:00:00 2001 From: "omegablast2002@yahoo.com" Date: Sat, 1 Oct 2011 18:42:43 +0000 Subject: [PATCH] fixed a crash when AiAction calls player->getObserver in multiclick. important note: AiAction you always want to call "owner" becuase "player" here means single target spell has a target and the target is "player". I didn't come up with the variable name, sorry it is very confusing in this spot of the code. --- projects/mtg/src/AIPlayer.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/mtg/src/AIPlayer.cpp b/projects/mtg/src/AIPlayer.cpp index b07b3bcd7..385e8a98d 100644 --- a/projects/mtg/src/AIPlayer.cpp +++ b/projects/mtg/src/AIPlayer.cpp @@ -85,7 +85,7 @@ int AIAction::Act() int AIAction::clickMultiAct(vector& actionTargets) { - GameObserver * g = player->getObserver(); + GameObserver * g = owner->getObserver(); TargetChooser * tc = g->getCurrentTargetChooser(); bool sourceIncluded = false; if(!tc) return 0;