fix(eff_ob): the packet names an entity and switches an effect on or off - #508
Merged
Merged
Conversation
The modern client's handler reads four fields: the first character of field 0 as the entity kind, field 1 as its id, field 2 as a switch (1 attaches the effect, 0 detaches it, anything else does nothing), field 3 as the effect. It never reads a map coordinate. Verified on screen: `eff_ob 1 2 1 4430` draws the ring of magenta arcs around the player and `eff_ob 1 2 0 4430` removes it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 50 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
The model has
ExtraSpace,MapX,MapY,Unknown,EffectId. The clientreads something else.
Its handler takes the first character of field 0 as the entity kind, field 1
as that entity's id, field 2 as a switch, and field 3 as the effect:
No map coordinate is read anywhere in it.
What was tested
In game, with a positive control so the result cannot be a coincidence - effect
4430 is a ring of magenta arcs and it is unmistakable:
eff_ob 1 2 1 4430eff_ob 1 2 0 4430eff_ob 79 115 0 4430eff_ob -1 -1 0 4430eff 1 2 4430(control, other route)dotnet build: 0 warnings.dotnet test: 127/127. The serializer corpussnapshot was edited by hand, two lines, so the diff stays two lines.
What this contradicts, and why I still think it is right
SerializeEffObPacketMatchesTracepinnedeff_ob -1 -1 0 4269, and that linereally is in a packet capture - four times. I replaced the assertion rather than
keep it, so this is worth stating plainly.
That capture is of an older protocol. On the modern client the line does
nothing: the double space puts an empty field in front, so everything shifts by
one and field 2 reads
-1, which is neither 1 nor 0, so no branch runs. Evenwithout the shift,
-1names no entity and the lookup fails first. It cannot bemade to draw anything, which is what the fourth row of the table above shows.
If the intent is to keep the model faithful to that capture rather than to the
client that reads it, say so and I will close this.