- added PlayerEntity.client_command(<str command>, [bool server_side])
- added PlayerEntity.slay()
- added EntityPostHook and EntityPreHook decorators to entities.hooks:
- @Entity<type>Hook(<str/list entity type(s)>, <str entity-method>)
- no longer a need to make sure an entity is on the server to create the hook
- added set_transmit virtual function to CBaseEntity data
- added sys.argv to get command line arguments when server was initialized
- added hard-coded entity KeyValues capabilities to Entity/PlayerEntity server classes
- added voice module with voice_server singleton
- added ability to get virtual functions of exposed member functions
- added a new FunctionInfo class, which stores information of a virtual member function.
- added a new Pointer.make_function() method, which requires a FunctionInfo object.
- added new functions to the memory module to retrieve FunctionInfo objects, class information, class names of the C++ classes, etc.
- Note: currently we have only added FunctionInfo objects for the IVoiceServer class. We will add more very soon.
- Here is an example on how to use the new functionality:
Syntax: Select all
import memory
from memory.hooks import PreHook
from players.voice import voice_server
# This function will be added in the next release
def get_function(obj, function_name, function_index=0):
return memory.get_object_pointer(obj).make_function(
memory.get_function_info(obj, function_name, function_index))
@PreHook(get_function(voice_server, 'SetClientListening'))
def on_pre_set_client_listening(args):
print(args)
- correctly raises a NameError when trying to get an entity KeyValue when the entity contains no KeyValue of the given name
- exposed CCheckTransmitInfo
- fixed several reported issues
- added Function.is_hooked() to test if the function (address) was hooked by SP
- reorganized the memory module on the C++ side (it's now much easier to read. though, that's just an internal change)
- updated data files (virtual function indexes)
For the full change log, look here:
https://github.com/Source-Python-Dev-Team/Source.Python/compare/90bf270...37a0444
As always, the release can be found here:
https://github.com/Source-Python-Dev-Team/Source.Python/releases
We do hope to have a build-bot site up and running fairly soon. We are just waiting on a couple things to get done before that becomes a reality. This means that in the future, you will be able to get an updated snapshot when we commit to the development branch.