So I’ve done a bit of debugging:[LUA]if ent1:GetPos():Distance(ent2:GetPos()) < 500 and !ent1.Printed then print(CurTime(), “Distance”) ent1.Printed = true end
for _,entity in pairs(ents.FindInSphere(ent1:GetPos(), 450)) do
if entity == ent2 and !entity.Printed then
entity.Printed = true
end[/LUA]I basically pull the ent1 closer to the ent2. Entity found with ents.FindInSphere() will always get printed first, doesn’t matter that its 50 units less than with distance. It runs normally when lowered by 100 units or so. It doesn’t matter which piece of code gets ran first.
So is this a bug? Or does this have to be like this?