Skip to content

Added ShowMenu implementation#383

Merged
jordanbriere merged 3 commits into
Source-Python-Dev-Team:masterfrom
vinci6k:showmenu_impl
Feb 2, 2021
Merged

Added ShowMenu implementation#383
jordanbriere merged 3 commits into
Source-Python-Dev-Team:masterfrom
vinci6k:showmenu_impl

Conversation

@vinci6k

@vinci6k vinci6k commented Feb 1, 2021

Copy link
Copy Markdown
Contributor
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

Ayuto commented Feb 1, 2021

Copy link
Copy Markdown
Member

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

vinci6k commented Feb 1, 2021

Copy link
Copy Markdown
Contributor Author

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