From b0919139bdda0d0dd1f6935ca6894135517478ab Mon Sep 17 00:00:00 2001 From: erihel Date: Thu, 11 Apr 2013 15:34:03 +0200 Subject: * Fix for issue #161: function checking for radar didn't check if it's finished --- src/object/robotmain.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/object') diff --git a/src/object/robotmain.cpp b/src/object/robotmain.cpp index 2c890a4..9f95e10 100644 --- a/src/object/robotmain.cpp +++ b/src/object/robotmain.cpp @@ -6801,10 +6801,10 @@ bool CRobotMain::GetRadar() for (int i = 0; i < 1000000; i++) { CObject* obj = static_cast(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; -- cgit v1.2.3-1-g7c22