* Fix for issue #161: function checking for radar didn't check if it's finished

dev-ui
erihel 2013-04-11 15:34:03 +02:00
parent 01309c8bd0
commit b0919139bd
1 changed files with 2 additions and 2 deletions

View File

@ -6801,10 +6801,10 @@ bool CRobotMain::GetRadar()
for (int i = 0; i < 1000000; i++)
{
CObject* obj = static_cast<CObject*>(iMan->SearchInstance(CLASS_OBJECT, i));
if (obj == 0) break;
if (obj == nullptr) break;
ObjectType type = obj->GetType();
if (type == OBJECT_RADAR)
if (type == OBJECT_RADAR && !obj->GetLock())
return true;
}
return false;