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.
This commit is contained in:
@@ -85,7 +85,7 @@ int AIAction::Act()
|
|||||||
|
|
||||||
int AIAction::clickMultiAct(vector<Targetable*>& actionTargets)
|
int AIAction::clickMultiAct(vector<Targetable*>& actionTargets)
|
||||||
{
|
{
|
||||||
GameObserver * g = player->getObserver();
|
GameObserver * g = owner->getObserver();
|
||||||
TargetChooser * tc = g->getCurrentTargetChooser();
|
TargetChooser * tc = g->getCurrentTargetChooser();
|
||||||
bool sourceIncluded = false;
|
bool sourceIncluded = false;
|
||||||
if(!tc) return 0;
|
if(!tc) return 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user