*Fix a bug in NearestGameObjectCheck.
--HG-- branch : trunk
This commit is contained in:
@@ -655,8 +655,12 @@ namespace Trinity
|
|||||||
NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) {}
|
NearestGameObjectCheck(WorldObject const& obj) : i_obj(obj), i_range(999) {}
|
||||||
bool operator()(GameObject* go)
|
bool operator()(GameObject* go)
|
||||||
{
|
{
|
||||||
i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
|
if(i_obj.IsWithinDistInMap(go, i_range))
|
||||||
return true;
|
{
|
||||||
|
i_range = i_obj.GetDistance(go); // use found GO range as new range limit for next check
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
float GetLastRange() const { return i_range; }
|
float GetLastRange() const { return i_range; }
|
||||||
private:
|
private:
|
||||||
|
|||||||
Reference in New Issue
Block a user