mirror of
https://github.com/vcmi/vcmi.git
synced 2025-02-03 13:01:33 +02:00
One more fix.
This commit is contained in:
parent
a8539b2b28
commit
12bb9221d1
@ -278,8 +278,12 @@ float GetObj::importanceWhenLocked() const
|
|||||||
|
|
||||||
bool GetObj::fulfillsMe (TSubgoal goal)
|
bool GetObj::fulfillsMe (TSubgoal goal)
|
||||||
{
|
{
|
||||||
if (goal->goalType == Goals::VISIT_TILE && cb->getObj(ObjectInstanceID(objid))->visitablePos() == goal->tile)
|
if (goal->goalType == Goals::VISIT_TILE)
|
||||||
return true;
|
{
|
||||||
|
auto obj = cb->getObj(ObjectInstanceID(objid));
|
||||||
|
if (obj && obj->visitablePos() == goal->tile) //object could be removed
|
||||||
|
return true;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user