1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-26 03:52:01 +02:00

code review

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
This commit is contained in:
Laserlicht 2024-10-14 19:30:03 +02:00 committed by GitHub
parent f7e3641c04
commit 129f8e6f34
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -484,7 +484,7 @@ std::vector<ConstTransitivePtr<CGObjectInstance>> CGameInfoCallback::getAllVisit
{
std::vector<ConstTransitivePtr<CGObjectInstance>> ret;
for(auto & obj : gs->map->objects)
if(obj->isVisitable() && obj->ID != Obj::EVENT && getTile(obj->pos, false))
if(obj->isVisitable() && obj->ID != Obj::EVENT && isVisible(obj))
ret.push_back(obj);
return ret;