Search found 6 matches: callingconvention

Searched query: callingconvention

by Ayuto
Wed Dec 30, 2020 10:01 pm
Forum: Development Status Updates
Topic: Development status update (December 2020)
Replies: 1
Views: 8443

Development status update (December 2020)

... problem with dangling references around ExtractPointer (issues #334, #372, #373). ⋅ Additions: ⋅  Added default convention to CallingConvention. ⋅  Added instance_property support to entity managers. ⋅  Added access to CGameRules and its properties. ⋅ Removals: ...
by Jezza
Sun Sep 13, 2020 7:34 pm
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 11
Views: 20336

Re: Server crash on @EntityPreHook

... wrote, you can hook it by creating a custom calling convention. There is also a pull request on Github that adds the default convention to CallingConvention. https://github.com/Source-Python-Dev-Team/Source.Python/pull/344 # Source.Python Imports # Memory from memory import CallingConvention ...
by L'In20Cible
Tue Mar 17, 2020 10:21 pm
Forum: Plugin Development Support
Topic: Convention.STDCALL: 'Convention' object is not callable
Replies: 1
Views: 11306

Re: Convention.STDCALL: 'Convention' object is not callable

... on Linux that is only available on Windows. So the MakeDynamicHooksConvention call fails, is catched here and fallback to assuming you passed a CallingConvention subclass to be used as a factory. Which also fails because a Convention enumerator is not callable so an error is thrown while attempting ...
by L'In20Cible
Thu Jan 09, 2020 2:39 am
Forum: Plugin Development Support
Topic: Server crash on @EntityPreHook
Replies: 11
Views: 20336

Re: Server crash on @EntityPreHook

... but STDCALL and CUSTOM give the error. TypeError: 'Convention' object is not callable To use a custom convention, you must subclass CallingConvention telling it where to retrieve the arguments, etc. Ayuto provided some examples in the past: https://forums.sourcepython.com/search.php?keywords=callingconvention ...
by Ayuto
Fri Apr 21, 2017 4:31 pm
Forum: Plugin Development Support
Topic: Need help hooking these functions
Replies: 5
Views: 5178

Re: Need help hooking these functions

... functions are very weird. You might want to try this: import memory from memory import DataType from memory import Register from memory import CallingConvention from memory.hooks import PreHook from memory.hooks import PostHook class WeirdConvention(CallingConvention): def get_registers(self): ...
by Ayuto
Sun Apr 26, 2015 5:48 pm
Forum: Plugin Development Support
Topic: How to reset the player's sound to normal on player_blind?
Replies: 55
Views: 28950

... with a little work! import memory from memory import DataType from memory.hooks import PreHook from _memory import Register from _memory import CallingConvention class x86MsCCSPlayerDeafen(CallingConvention): def get_registers(self): return [Register.ECX, Register.XMM1] def get_pop_size(self): ...

Go to advanced search