Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pressing a button in :Draw presses it twice #37

Open
amanitasolanaceae opened this issue Jan 4, 2022 · 1 comment
Open

Pressing a button in :Draw presses it twice #37

amanitasolanaceae opened this issue Jan 4, 2022 · 1 comment
Labels
bug Something isn't working

Comments

@amanitasolanaceae
Copy link

see title; i am not sure what kind of debug output would be more helpful/informative. i've been able to get around this by specifying a cooldown until the code in the condition runs again after pressing the button but this seems hacky.

@wyozi
Copy link
Contributor

wyozi commented Jan 7, 2022

These cases are a bit tricky. What rendergroup does the entity have? It's possible that Draw is getting called twice per frame (opaque + translucent), in which case the event if might also trigger twice. Sometimes also having reflective surfaces (i.e. water) visible on screen can cause it, although imgui should have relatively good protections against that.

Cooldown is an ok solution in my books, if it's not a rendergroup related issue.

@wyozi wyozi added the bug Something isn't working label Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants