Refactor socket - #328
Conversation
…placement of individual values with the table.
… level. Removed the timer.
Prevents the toolgun from interacting with the socket
Micro-optimization of solid flags (avoiding redundant calculations)
|
I think the only breaking change here is that |
|
Also |
Essentially, it just calls the However, if you really want full compatibility without calling that function, I can make a modification if you like. |
For better compatibility, `setpos` and `setangles` will be handled within the `ENT:InitializeSocket` function.
I’ve changed it, the name was indeed quite misleading. |
Summary
In this PR, the socket code has been completely rewritten from scratch.
It eliminates the need for timers and
Thinkhooks (except in dev mode) in favor of theTouchfunction.Features
Touchfunction instead of a timer to locate the nearest socket.vehiclesWithSocketstable is retained for backward compatibility but is not used in Glide.radiusargument to the socket, allowing the detection zone to be configured.Dev Mode
Thinkfunction; this will be reworked in a future PR to use a timer that is created or destroyed based on the activation or deactivation of thedeveloperconvar.