Closed thecraftianman closed 3 weeks ago
I think the PlayerWasLookingAtMe var won't ever be updated to false with this change. Need to check that, and check that overlay text/data is updating correctly.
PlayerWasLookingAtMe gets updated to false during the looked_at:BeingLookedAtByLocalPlayer()
call that occurs when looking away from the entity at something else. I did just find that it isn't properly adjusted when looking between two Wire entities, though, so I'm fixing that now.
I've tested this with multiple entities that update their own overlay text, and everything appears to still function as expected.
Will check it out in a bit
When many entities derived from
base_wire_entity
exist at once, they all separately (and continuously) perform their own logic to test if the overlay should be visible or not, which can have a pretty notable performance impact clientside. This PR combines all of these potential calls into a single Think hook, which is way faster.Here's a comparison between having 93
base_wire_entity
-derived entities out before and after measured over 20 seconds for this logic: