Improvements to ESP Skeleton - #1095
Open
rkwapisz wants to merge 2 commits into
Open
Conversation
- Refactored w2s; the native function is a bool, so our wrapper should be as well - Implemented a lambda for bone drawing as it's easier to modify arguments to one function instead of a dozen - Fixed glitchy bone draw behavior by preventing line draws when a bone is off-screen - Added a scaling head circle and replaced head bone with a better hash (FB_Brow_Centre_000)
|
Download the artifacts for this pull request: |
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.
I miss YimMenu.
As documented in a prior rejected(?) PR, the current build of YimMenuV2 has buggy ESP skeleton draws, which was being caused by the menu trying to draw bones even when either end of the bone was off-screen.
This PR is a simple refactor that still leverages the w2s native and works fine in all practical cases. I've also added a simple head bone draw since that's the one most people care about. If part of a bone is off-screen, we simply won't draw it.
Ideally we'd want to use own own w2s since calling natives inside rendering isn't a fantastic idea, but for now this gets rid of a bigger problem.
I've tested these changes for a few hours tonight and am happy with the improvements.
Summary of changes:
Refactored the w2s wrapper; the native function is a bool, so ours should be as well, and now we're actually checking the return before trying to do anything with screenx/screeny which fixes the bad bone draw behavior.
I didn't want to modify a dozen calls to AddLine every time I wanted to tweak line thickness, so I created another lambda for the draws and settled on a thickness of 1.0f. Anything higher is way too chunky.
Added a scaling head bone circle that tracks a better bone (FB_Brow_Centre_000) which is a little higher up on the head (see attached image) and provides better drawing results.