Skip to content

Update server functions for latest tf2 sdk branch #411

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update server functions for latest tf2 sdk branch
  • Loading branch information
laurirasanen committed Sep 18, 2021
commit b3e72569274cd8c50c59a3fbc6a38a795ad9cc99
17 changes: 17 additions & 0 deletions src/core/modules/engines/engines_server_wrap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -521,10 +521,12 @@ static void export_engine_server(scope _server)
"Tells the engine we can immediately re-use all the edict indices."
)

#if !defined (ENGINE_BRANCH_TF2)
.def("is_internal_build",
&IVEngineServer::IsInternalBuild,
"Returns true if the engine is an internal build."
)
#endif

.def("get_change_accessor",
&IVEngineServer::GetChangeAccessor,
Expand Down Expand Up @@ -751,7 +753,9 @@ static void export_engine_server(scope _server)
FUNCTION_INFO(GetPrevCheckTransmitInfo)
FUNCTION_INFO(GetSharedEdictChangeInfo)
FUNCTION_INFO(AllowImmediateEdictReuse)
#if !defined (ENGINE_BRANCH_TF2)
FUNCTION_INFO(IsInternalBuild)
#endif
FUNCTION_INFO(GetChangeAccessor)
FUNCTION_INFO(CleanUpEntityClusterList)
FUNCTION_INFO(GetAppID)
Expand Down Expand Up @@ -885,9 +889,22 @@ static void export_iserver(scope _server)
":rtype: int"
);

#if defined(ENGINE_BRANCH_TF2)
_IServer.add_property(
"public_address",
&IServer::GetPublicAddress,
"Return the currently used public address.\n\n"
":rtype: NetAdr" // TODO
);
#endif

_IServer.add_property(
"udp_port",
#if defined(ENGINE_BRANCH_TF2)
&IServer::GetLocalUDPPort,
#else
&IServer::GetUDPPort,
#endif
"Return the currently used UDP port.\n\n"
":rtype: int"
);
Expand Down