Permalink
Browse files

Exposed GetDataTableProxyFn

  • Loading branch information...
Ayuto committed May 22, 2018
1 parent 71efd41 commit 67d0f46f48d24ab7f63ff7c7bed1cde50ab23a1d
@@ -147,6 +147,17 @@ BoostSendVarProxyFn SendPropSharedExt::get_proxy_function(SendProp *pSendProp)
return BoostSendVarProxyFn(pSendProp->GetProxyFn());
}
BoostDataTableProxyFn SendPropSharedExt::get_data_table_proxy_function(SendProp *pSendProp)
{
if (pSendProp->IsExcludeProp())
BOOST_RAISE_EXCEPTION(PyExc_TypeError, "%s is excluded.", pSendProp->GetName());
if (pSendProp->GetType() != DPT_DataTable)
BOOST_RAISE_EXCEPTION(PyExc_TypeError, "%s is not a DataTable.", pSendProp->GetName());
return BoostDataTableProxyFn(pSendProp->GetDataTableProxyFn());
}
// ============================================================================
// >> SendPropVariantExt
@@ -41,6 +41,7 @@
// typedefs
//-----------------------------------------------------------------------------
BOOST_FUNCTION_TYPEDEF(void (const SendProp*, const void*, const void*, DVariant*, int, int), BoostSendVarProxyFn)
BOOST_FUNCTION_TYPEDEF(void* (const SendProp*, const void*, const void*, CSendProxyRecipients*, int), BoostDataTableProxyFn)
//-----------------------------------------------------------------------------
@@ -67,6 +68,7 @@ class SendPropSharedExt
{
public:
static BoostSendVarProxyFn get_proxy_function(SendProp *pSendProp);
static BoostDataTableProxyFn get_data_table_proxy_function(SendProp *pSendProp);
};
@@ -142,7 +142,10 @@ void export_send_prop(scope _props)
);
SendProp_.add_property("offset", &SendProp::GetOffset);
// TODO: Rename proxy_function to send_var_proxy_function
SendProp_.add_property("proxy_function", &SendPropSharedExt::get_proxy_function);
SendProp_.add_property("data_table_proxy_function", &SendPropSharedExt::get_data_table_proxy_function);
// CS:GO specific properties...
SendProp_.NOT_IMPLEMENTED_ATTR("priority");

0 comments on commit 67d0f46

Please sign in to comment.