Skip to content

Commit 47717c7

Browse files
committed
Added Player.get_client_convar_value()
1 parent 92b3adf commit 47717c7

File tree

1 file changed

+5
-1
lines changed
  • addons/source-python/packages/source-python/players

1 file changed

+5
-1
lines changed

addons/source-python/packages/source-python/players/_base.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def set_flashlight(self, enable):
645645
flashlight = property(get_flashlight, set_flashlight)
646646

647647
def send_convar_value(self, cvar_name, value):
648-
"""Send a convar value.
648+
"""Send a server convar value to the client.
649649
650650
:param str cvar_name:
651651
Name of the convar.
@@ -660,6 +660,10 @@ def send_convar_value(self, cvar_name, value):
660660
buffer.write_string(str(value))
661661
self.client.net_channel.send_data(buffer)
662662

663+
def get_client_convar_value(self, name):
664+
"""Wrapper for :meth:`engines.server.engine_server.get_client_convar_value`."""
665+
return engine_server.get_client_convar_value(self.index, name)
666+
663667
@property
664668
def spectators(self):
665669
"""Return all players observing this player.

0 commit comments

Comments
 (0)