Closed EdoTM closed 3 years ago
Well anyone can replace one function call with another, so just to be sure you understand what you're doing, describe what SetNetworkedBeamString
is.
SetNetworkedBeamString are just wire's implementation of SetNWString that was removed a long time ago.
Networked Beams were an attempt to optimize the data flow between server and client when treating large data (there's also a description here, a more-than-10-years-old file) but they eventually got removed (along with the NW Beam library) by AbigailBuccaneer in 2015. Some wire extras items (such as doors and door controllers) still use these, and they do generate errors when you try to use them (actually, in some cases you can't use them due to these errors).
A fix would be changing SetNetworkedBeamString
to SetNWString
, as it has already been done in #74. I personally tried doors and door controllers, and with this fix they work smoothly without a single error.
I'll have time to review tomorrow.
@thegrb93 You do realize, that if you give any kind of hint on what beams are, that kinda defeats the point of that test :) @EdoTM passed with flying colors, though :)
Oh, thought you were asking rather than testing
I'm now removing unused net.Write*
/Read*
, and I noticed that in wire_modular_panel.lua
there's a strange behavior in usermessages and servermessages. On line 325 of the file that is currently on the repository, a usermessage named smsgModularPanel
is initialized (the name is the same of the servermessage defined on line 204. They are correlated, but I don't know if the fact of them having an identical name is actually intentional), but there's no usermessage.Hook("smsgModularPanel", ...)
or umsgModularPanel
in any file, i.e. there's no clientside hook called smsgModularPanel
from line 325.
Am I missing something?
Edit: I've noticed that there are several problems with Modular Panels already (#63, #97) so maybe we can skip wire_modular_panel.lua
and leave its implementation to #97.
Looks like a 1 to 1 conversion and looks fine. If you wouldn't mind just cleaning up the unneeded comments and revert the GetConVar change, it will be perfect.
Removed unnecessary comments and reverted GetConVar(...):GetInt()
with GetConVarNumber(...)
Thanks. Looks good
Overall optimization:
SetNetworked...
withSetNW...
,surface.ScreenWidth()
withScrW()
,table.getn(tbl)
with#tbl
, etc.)SetNetworkedBeamString
withSetNWString
I didn't actually edit anything else other than these things.