From ea1fecf4c76acdf59688d961651bebb2d50efe2b Mon Sep 17 00:00:00 2001 From: Jonathan <30329245+CookStar@users.noreply.github.com> Date: Sat, 24 Oct 2020 19:00:38 +0900 Subject: [PATCH] Added default argument to Send/Deny/RequestFile functions. --- .../modules/net_channel/net_channel_wrap.cpp | 36 +++++++++++++++++-- 1 file changed, 33 insertions(+), 3 deletions(-) mode change 100644 => 100755 src/core/modules/net_channel/net_channel_wrap.cpp diff --git a/src/core/modules/net_channel/net_channel_wrap.cpp b/src/core/modules/net_channel/net_channel_wrap.cpp old mode 100644 new mode 100755 index d6e0f3f07..0ed76b48a --- a/src/core/modules/net_channel/net_channel_wrap.cpp +++ b/src/core/modules/net_channel/net_channel_wrap.cpp @@ -90,18 +90,48 @@ void export_net_channel(scope _net_channel) make_function(&INetChannel::GetMsgHandler, reference_existing_object_policy()) ); + NetChannel.def( + "set_data_rate", + &INetChannel::SetDataRate + ); + +#if defined(ENGINE_BLADE) || defined(ENGINE_CSGO) || defined(ENGINE_LEFT4DEAD2) NetChannel.def( "send_file", - &INetChannel::SendFile + &INetChannel::SendFile, + (arg("file_name"), arg("transfer_id"), arg("is_replay_demo")=false) + ); + + NetChannel.def( + "deny_file", + &INetChannel::DenyFile, + (arg("file_name"), arg("transfer_id"), arg("is_replay_demo")=false) ); NetChannel.def( "request_file", - &INetChannel::RequestFile); + &INetChannel::RequestFile, + (arg("file_name"), arg("is_replay_demo")=false) + ); +#else + NetChannel.def( + "send_file", + &INetChannel::SendFile, + (arg("file_name"), arg("transfer_id")) + ); NetChannel.def( "deny_file", - &INetChannel::DenyFile); + &INetChannel::DenyFile, + (arg("file_name"), arg("transfer_id")) + ); + + NetChannel.def( + "request_file", + &INetChannel::RequestFile, + (arg("file_name")) + ); +#endif NetChannel.def( "send_data",