mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
int3 dist2d microoptimization
This commit is contained in:
@ -424,7 +424,7 @@ const CGObjectInstance * CMap::getObjectiveObjectFrom(int3 pos, Obj::EObj type)
|
||||
bestMatch = object;
|
||||
else
|
||||
{
|
||||
if (object->pos.dist2d(pos) < bestMatch->pos.dist2d(pos))
|
||||
if (object->pos.dist2dSQ(pos) < bestMatch->pos.dist2dSQ(pos))
|
||||
bestMatch = object;// closer than one we already found
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user