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

GameEvent listener improvement #413

Closed
Kroytz opened this issue Apr 12, 2024 · 4 comments
Closed

GameEvent listener improvement #413

Kroytz opened this issue Apr 12, 2024 · 4 comments
Labels
untriaged New issue has not been triaged

Comments

@Kroytz
Copy link

Kroytz commented Apr 12, 2024

I found item_equip only fire once when I receive an item but not like CSGO does(fire at everytime weapon switch). Seems like CreateEvent function fails sometimes. So we can add a hook for CreateEvent and make the bForce always true. IDK why it works at least it works for me.

@github-actions github-actions bot added the untriaged New issue has not been triaged label Apr 12, 2024
@Kroytz
Copy link
Author

Kroytz commented Apr 12, 2024

Sorry I found HookEvent logic has done the same logic (FindListener then AddListener)

@Kroytz Kroytz closed this as completed Apr 12, 2024
@Kroytz
Copy link
Author

Kroytz commented Apr 16, 2024

Test again with hook CreateEvent and change param bForce = true, then item_equip event works as expected.

@Kroytz Kroytz reopened this Apr 16, 2024
@roflmuffin
Copy link
Owner

I'm not sure we should really be changing this bool, because the fact that it doesn't fire is coming from valve code directly, so forcing these through may have unforeseen consequences

@KillStr3aK
Copy link
Contributor

I'm not sure we should really be changing this bool, because the fact that it doesn't fire is coming from valve code directly, so forcing these through may have unforeseen consequences

I agree

@Kroytz Kroytz closed this as completed May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
untriaged New issue has not been triaged
Projects
None yet
Development

No branches or pull requests

3 participants