-
Notifications
You must be signed in to change notification settings - Fork 343
Major Update to Wire Map Interface #3351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 3 commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
93027d3
Major Update to Wire Map Interface
Grocel d3cda76
WMI: Only add hooks if an info_wiremapinterface spawns.
Grocel c7feb38
Merge branch 'wiremod:master' into master
Grocel 0da860d
shorter id checks
Grocel 3d0b1dd
Only cleanup existing values
Grocel 15c5f67
add spacing
Grocel 2d65701
Refactored wire_map_interface.lua in suggested style
Grocel bdb655f
no need to check for NaN, so remove it
Grocel 188374a
validate `info.Wires` to be a table
Grocel 49165af
More compact `SrcWmiSpawnId` setter
Grocel b661703
More compact `EntityWmiSpawnId` setter
Grocel 42db92f
Remove unused vars
Grocel 9a648f2
Less garry code for custom hammer output logic.
Grocel 1c2344c
Get rid of timers and global state in networking
Grocel 8166dfd
Better more reliable networking for PlayerInitialSpawn. Don't network…
Grocel 03c5331
Remove debug prints
Grocel e176a0c
avoid table.insert c call
Grocel e05d0ee
Remove WIRE_CLIENT_INSTALLED leftover, clarify WireAddon check
Grocel 4f77055
Remove `outputNameLower ` var
Grocel 6152026
More compact if statements.
Grocel a7a4959
Replace anti-dupe hack with something more reasonable.
Grocel 37d0049
Also remove `ENT:CanTool()` on the main entity.
Grocel 73973d9
Never remove entities that's aren't map spawned.
Grocel 85ca1d6
Merge branch 'wiremod:master' into master
Grocel File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.luawould 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.
There was a problem hiding this comment.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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'sincludeto after the include gives an exact increase of6.869140625over 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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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"
There was a problem hiding this comment.
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.