Repository navigation
Map embedded struct changes to their props in local entity transfer - #286
Merged
Merged
Conversation
Merged
Contributor
|
This seems like a bug in the generator code so I don't think this solution is correct. |
Member
|
@ZehMatt if you can double check, that looks like the source generator solution |
marchc1
approved these changes
Nov 20, 2026
ZehMatt
approved these changes
Nov 21, 2026
Contributor
There was a problem hiding this comment.
I think this is fine for now, the difference is however that it now does full copies of the entire array but it at least stops dropping changes but this needs to be reworked so I think this is acceptable for the time being.
Might be worth editing the title and PR description now but that isn't important really.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Changing a struct network var through its
ForModifyaccessor (for exampleFogForModify().Enable = false) never reached the client in singleplayer. The change is reported with the root field (Fog), but the send props are keyed by their full path (Fog.Enable,Fog.Start...), soMapPropFieldsToIndicesfound nothing and dropped the change (dt_ShowPartialChangeEnts 1printsLocalTransfer field miss - DT: DT_FogController, field: Fog).In the SDK each member of an embedded network var reports its own offset. Here the root is now mapped to the props it contains when the prop map is built, and a changed root copies only those props. If they don't fit in the list, the entity is copied entirely like a full update.
Tested: all four configurations build,
Source.Common.TestsandGame.Server.Testspass. With theenv_fog_controllerport,TurnOffandSetRadialnow update the fog on all maps and the field miss is gone.