Skip to content
This repository was archived by the owner on Jun 28, 2026. It is now read-only.

Fix calling Dirty+DiryField on same tick#129

Closed
Illiux wants to merge 3 commits into
Space-Wizards-Federation:masterfrom
Illiux:component-delta-fix
Closed

Fix calling Dirty+DiryField on same tick#129
Illiux wants to merge 3 commits into
Space-Wizards-Federation:masterfrom
Illiux:component-delta-fix

Conversation

@Illiux

@Illiux Illiux commented Jun 21, 2026

Copy link
Copy Markdown

This commit changes IComponentDelta to hold the last tick of a generic dirty rather than the last tick of any field
modification. Additionally, the bitset returned via GetModifiedFields (now GetModifiedAspects) has been extended to
ulong and the high bit used to indicate an unclassified update. This approach is safer for consumers because it
causes the lack of explicit handling for an unclassified update to surface as a field update to an unknown field.

In the future, it would also be reasonable to use other high bits if we wanted to represent more specific change kinds.
Also, I left the 32 field limit as-is in this commit, effectively leaving the remaining 31 bits reserved.

Finally, while I was in here, I fixed what as far as I could determine was a pervasive and mostly harmless off-by-one
error where we were sending updates if the modification occured on the same tick as fromTick. That should be unnecessary
as fromTick has already been acknowledged by the client. That is, unless I missed something of course.

fixes space-wizards/RobustToolbox#6524

slarticodefast and others added 3 commits June 19, 2026 11:01
This commit changes IComponentDelta to hold the last tick of a generic dirty rather than the last tick of any field
modification. Additionally, the bitset returned via GetModifiedFields (now GetModifiedAspects) has been extended to
ulong and the high bit used to indicate an unclassified update. This approach is safer for consumers because it
causes the lack of explicit handling for an unclassified update to surface as a field update to an unknown field.

In the future, it would also be reasonable to use other high bits if we wanted to represent more specific change kinds.
Also, I left the 32 field limit as-is in this commit, effectively leaving the remaining 31 bits reserved.

Finally, while I was in here, I fixed what as far as I could determine was a pervasive and mostly harmless off-by-one
error where we were sending updates if the modification occured on the same tick as fromTick. That should be unnecessary
as fromTick has already been acknowledged by the client.

fixes space-wizards/RobustToolbox#6524
@Illiux Illiux requested a review from DrSmugleaf as a code owner June 21, 2026 04:33

@metalgearsloth metalgearsloth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

tentative because gamestate scares me.

Comment on lines +277 to +278
{
var serverOpts = new ServerIntegrationOptions { Pool = false };

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Any reason it doesn't pool?

@slarticodefast

Copy link
Copy Markdown
Member

Could you move this PR to the old repository here https://github.com/space-wizards/RobustToolbox ?
Ownership was transferred back to our maintainer team and development will continue there. This repository will soon be archived. Sorry for all the chaos.
Feel free to ping me when you did and I'll give it a review.

@Illiux Illiux closed this by deleting the head repository Jun 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Calling both Dirty and DirtyField in the same game tick will only send the field delta

3 participants