mirror of
https://github.com/vcmi/vcmi.git
synced 2025-04-09 07:13:54 +02:00
This commit is contained in:
parent
aefe5923fd
commit
6af8db2c69
@ -1659,12 +1659,19 @@ void VCAI::validateVisitableObjs()
|
||||
std::string errorMsg;
|
||||
auto shouldBeErased = [&](const CGObjectInstance *obj) -> bool
|
||||
{
|
||||
if(!vstd::contains(hlp, obj))
|
||||
{
|
||||
logAi->errorStream() << helperObjInfo[obj].name << " at " << helperObjInfo[obj].pos << errorMsg;
|
||||
if (obj)
|
||||
return !cb->getObj(obj->id);
|
||||
else
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
||||
//why would we have our local logic for object checks? use cb!
|
||||
|
||||
//if(!vstd::contains(hlp, obj))
|
||||
//{
|
||||
// logAi->errorStream() << helperObjInfo[obj].name << " at " << helperObjInfo[obj].pos << errorMsg;
|
||||
// return true;
|
||||
//}
|
||||
//return false;
|
||||
};
|
||||
|
||||
//errorMsg is captured by ref so lambda will take the new text
|
||||
|
Loading…
x
Reference in New Issue
Block a user