ovf's OCD

> ovf: krzys_h: i'm sorry, your last commit triggered a random ocd fit. http://vpaste.net/S6u62
> ovf: (you don't need to apply this, i already feel better now)
master
krzys-h 2015-03-29 20:30:29 +02:00
parent 6844b2170f
commit 0ce72bdce0
1 changed files with 6 additions and 11 deletions

View File

@ -2125,17 +2125,12 @@ CObject* CRobotMain::DetectObject(Math::Point pos)
{
target = obj;
}
else if ((type == OBJECT_POWER ||
type == OBJECT_ATOMIC) &&
obj->GetTruck() != nullptr) // battery used?
{
target = obj->GetTruck();
}
else if (type == OBJECT_POWER ||
type == OBJECT_ATOMIC)
{
target = obj;
}
else if (type == OBJECT_POWER || type == OBJECT_ATOMIC)
{
target = obj->GetTruck(); // battery connected
if (!target) target = obj; // standalone battery
}
for (int j = 0; j < OBJECTMAXPART; j++)
{