Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
93027d3
Major Update to Wire Map Interface
Grocel Jun 5, 2025
d3cda76
WMI: Only add hooks if an info_wiremapinterface spawns.
Grocel Jun 22, 2025
c7feb38
Merge branch 'wiremod:master' into master
Grocel Jun 29, 2025
0da860d
shorter id checks
Grocel Jul 1, 2025
3d0b1dd
Only cleanup existing values
Grocel Jul 1, 2025
15c5f67
add spacing
Grocel Jul 1, 2025
2d65701
Refactored wire_map_interface.lua in suggested style
Grocel Jul 2, 2025
bdb655f
no need to check for NaN, so remove it
Grocel Jul 2, 2025
188374a
validate `info.Wires` to be a table
Grocel Jul 3, 2025
49165af
More compact `SrcWmiSpawnId` setter
Grocel Jul 3, 2025
b661703
More compact `EntityWmiSpawnId` setter
Grocel Jul 3, 2025
42db92f
Remove unused vars
Grocel Jul 3, 2025
9a648f2
Less garry code for custom hammer output logic.
Grocel Jul 6, 2025
1c2344c
Get rid of timers and global state in networking
Grocel Jul 6, 2025
8166dfd
Better more reliable networking for PlayerInitialSpawn. Don't network…
Grocel Jul 6, 2025
03c5331
Remove debug prints
Grocel Jul 6, 2025
e176a0c
avoid table.insert c call
Grocel Jul 8, 2025
e05d0ee
Remove WIRE_CLIENT_INSTALLED leftover, clarify WireAddon check
Grocel Jul 13, 2025
4f77055
Remove `outputNameLower ` var
Grocel Jul 14, 2025
6152026
More compact if statements.
Grocel Jul 14, 2025
a7a4959
Replace anti-dupe hack with something more reasonable.
Grocel Jul 14, 2025
37d0049
Also remove `ENT:CanTool()` on the main entity.
Grocel Jul 14, 2025
73973d9
Never remove entities that's aren't map spawned.
Grocel Jul 14, 2025
85ca1d6
Merge branch 'wiremod:master' into master
Grocel Jul 14, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lua/autorun/wire_load.lua
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ if SERVER then
include("wire/server/modelplug.lua")
include("wire/server/debuggerlib.lua")
include("wire/server/sents_registry.lua")
include("wire/server/wire_map_interface.lua")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could be nice if this only gets included when a map interface is present

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wire_map_interface.lua has like no overhead though, and isn't networked, so what's the point? seems like it would cause more headache than its worth to not include the file

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would cause issues with:
https://github.com/wiremod/wire/pull/3351/files#diff-11f733e8c74f850d57c2ed245e889bf04028edfa9f155d3c91bb44550d46c27cR860-R869

I could add a check if it was loaded to it, but I am not sure if this would remove the overhead you seem to be concerned about. It could also cause issues with save games loaded from the menu, as the wire_map_interface.lua would be loaded in too late to matter for that save file.

Please keep in mind that this file in question has already been reviewed once by @thegrb93 and has been optimized in accordance to his suggestions.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wire_map_interface.lua has like no overhead though, and isn't networked, so what's the point? seems like it would cause more headache than its worth to not include the file

yet more gc lag, large servers get already destroyed by wiremods gc cluttering

Copy link
Contributor

@marchc1 marchc1 Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yet more gc lag, large servers get already destroyed by wiremods gc cluttering

feel like two tables wouldn't be that bad and again not worth the effort if it would cause issues with other parts of the system

Copy link
Contributor

@DarthTealc DarthTealc Jul 8, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gc

Using collectgarbage( "count" ), measuring wire_load.lua from the start of the file to the end of the file increases the number by an average of 918.5 across 6 test runs. Measuring from before wire_map_interface.lua's include to after the include gives an exact increase of 6.869140625 over each of the 6 tests runs.
My conclusion is that wire_load.lua's load is increased by only 0.75% (ie 3/4ths of a single percentage) by including this. It'd be 911.63 without wire_map_interface.lua, or 918.5 with it.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wire_map_interface.lua has like no overhead though, and isn't networked, so what's the point? seems like it would cause more headache than its worth to not include the file

yet more gc lag, large servers get already destroyed by wiremods gc cluttering

It depends what servers you're playing on, in all honesty. If those servers aren't controlling their players contraptions then that's on them - play any large Trainbuild server that uses mental amounts of wiremod and E2 stuff, you'll find that they are quite on it in terms of limiting their own players crazy stuff.

It's just a fact of GMod, being 20 years old - it's not changed much and unfortunately unless Facepunch make some radical engine changes it's going to inevitably struggle at certain parts. This is almost like saying "Why make something like wiremod? It's only going to make servers lag with all the processing"

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

your argument makes no sense
"the game will always lag because its old" doesnt mean you add more things that cause lag, especially things that are not used by the absolute majority of people.


if CreateConVar("wire_force_workshop", "1", FCVAR_ARCHIVE, "Should Wire force all clients to download the Workshop edition of Wire, for models? (requires restart to disable)"):GetBool() then
if select(2, WireLib.GetVersion()):find("Workshop", 1, true) then
Expand Down
Loading
Loading