Skip to content

Added ShowMenu implementation #383

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

Merged
merged 3 commits into from
Feb 2, 2021

Conversation

vinci6k
Copy link
Contributor

@vinci6k vinci6k commented Feb 1, 2021

As promised: https://forums.sourcepython.com/viewtopic.php?f=37&t=2472#p15210

Tested in CSS and CSGO with:

# ../showmenu_hook/showmenu_hook.py

# Source.Python
from messages.hooks import HookUserMessage


@HookUserMessage('ShowMenu')
def showmenu_pre(recipients, buffer):
    print(recipients, buffer)

@Ayuto
Copy link
Member

Ayuto commented Feb 1, 2021

Thank you! Have you check very big menus on CS:S (bitbuffer)? Because there should actually be a byte that tells us whether or not the menu is chunked (right before the menu string):
https://github.com/Source-Python-Dev-Team/Source.Python/blob/master/addons/source-python/packages/source-python/messages/base.py#L242-L263

@vinci6k
Copy link
Contributor Author

vinci6k commented Feb 1, 2021

I used change_map.py to test the hook and oddly enough, nothing seemed wrong. 😅

@jordanbriere jordanbriere merged commit 3b9085f into Source-Python-Dev-Team:master Feb 2, 2021
@vinci6k vinci6k deleted the showmenu_impl branch February 15, 2021 18:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants