6 Years Ago
ENT:BeingLookedAtByLocalPlayer optimisation (#1514) * ENT:BeingLookedAtByLocalPlayer optimisation - ENT.ViewDistance can now set the maximum distance the worldtip is displayed at when looking at an entity. - The distance check now uses the view entity's ShootPos if its a player, just like the local player does. This makes the result consistent between a player and spectators. - Dist->DistToSqr - Order of operations changed in ENT:Think and ENT:BeingLookedAtByLocalPlayer to do traces last - optimises entities too far from the player from doing an unnecessary eyetrace. * Changed ViewDistance to MaxWorldTipDistance