--- src/CMakeLists.txt +++ src/CMakeLists.txt @@ -1155,8 +1155,6 @@ add_executable( zdoom WIN32 timidity/timidity.cpp win32/g15/g15.cpp #ST xlat/parse_xlat.cpp - ../upnpnat/upnpnat.cpp #ST - ../upnpnat/xmlParser.cpp #ST #fragglescript/t_fspic.cpp #fragglescript/t_func.cpp #fragglescript/t_load.cpp @@ -1200,7 +1198,6 @@ include_directories( . ../gdtoa ../dumb/include ../sqlite/ #ZA - ../upnpnat/ #ST ${CMAKE_BINARY_DIR}/gdtoa ${SYSTEM_SOURCES_DIR} ) --- src/sv_main.cpp +++ src/sv_main.cpp @@ -56,8 +56,6 @@ #include "networkheaders.h" -#include "../upnpnat/upnpnat.h" - // [BB] Needed for timeGetTime() in SERVER_Tick(). #ifdef _MSC_VER #include @@ -394,29 +392,6 @@ void SERVER_Construct( void ) // Set up a socket and network message buffer. NETWORK_Construct( usPort, false ); - // [BB] Forward the external port with UPnP. - if ( Args->CheckParm ( "-upnp" ) ) - { - UPNPNAT nat; - nat.init(5,10); - - int externalPort = NETWORK_GetLocalPort(); - - if ( Args->CheckValue( "-upnp" ) != NULL ) - externalPort = atoi( Args->CheckValue( "-upnp" ) ); - - if( !nat.discovery() ) - { - Printf( "NAT discovery error: %s\n", nat.get_last_error() ); - } - else if ( !nat.add_port_mapping("test",NETWORK_AddressToStringIgnorePort( NETWORK_GetCachedLocalAddress() ), externalPort, NETWORK_GetLocalPort(),"UDP") ) - { - Printf( "Error adding port mapping: %s\n",nat.get_last_error() ); - } - else - Printf( "Sucessfully added port mapping.\n" ); - } - // Initizlize the playeringame array (is this necessary?). for ( ULONG ulIdx = 0; ulIdx < MAXPLAYERS; ++ulIdx ) playeringame[ulIdx] = false;