Repository navigation
Draw Cyber Cage and Hot Hands at their game radii - #435
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 32 minutes. View limit details
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. |
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.
Cyber Cage and Hot Hands were drawn at the wrong size, so a plan built around where a cage blocks sight or how far a molly reaches was slightly off. Cyber Cage goes from 3.72 m to 3.45 m and Hot Hands from 4.5 m to 4.75 m. Saved ones stay where the user put them.
ci: test web
The numbers
Both come from the 13.09 game files.
CageRadiusis 345, read throughAbilityRadius, and its active minimap circle is 690 wide. The 3.72 came from the undeployed trap's 744 icon.ClampedRadiusof 475, overriding the 450 on its parent,Patch_Molotovs_Parent.ClampedRadius, so it inherits 450. Its 4.5 m is right and stays.Slow Orb stays at 6.5 m. The files give a ceiling of 900 and nothing that settles the real radius, so it needs measuring in a custom game.
Saved items
Nothing saved changes. Both circles keep their old box through
storedSizeand draw the new size centred in it. Old saves draw differently, about 7% smaller for Cyber Cage and 6% bigger for Hot Hands, and that is the point of the PR.Hot Hands is the first circle drawn bigger than its box, and the box was clamping it: with only the size changed, it kept drawing at 4.5 m and the test fails at a ratio of 1.0. So fill and outline now go through
OverflowBoxin aClip.nonestack. The lines are copied from #419, which needs the same thing for its range rings. The two PRs conflict in one spot, where #419's_buildOptionalRangesits next to_centeredOnBox. Keep both.Replays
Replay cone shadows from Cyber Cage shrink too, because they use the drawn size (
replay_frame.dart,_radiusOf).test/replay_frame_test.dartproves this with the real Cyber Cage zone. I didn't watch it in a replay: the one round I checked, Round 1 of the Split replay, had Cypher die without casting a cage.Ground truth
Windows release build. A main build placed Cyber Cage, Hot Hands, Snake Bite and an Alarmbot and saved them. The main build and this PR then opened those same files, and I compared the screenshots pixel by pixel.
The only changed pixels on either side are those two rings. Snake Bite and the Alarmbot match exactly. Main opened the library again afterwards and rendered it exactly as before, so the PR build didn't damage it.
In the PR build I dragged a saved Hot Hands and the whole ring moved with it, and undo put it back. I placed a new Cyber Cage and a new Hot Hands from the ability dock. An exported screenshot draws the whole ring, 71 px wide against Snake Bite's 67, which matches 4.75 to 4.5.
Not covered