MCPcopy Create free account
hub / github.com/DescentDevelopers/Descent3 / AutoConnectPXO

Function AutoConnectPXO

Descent3/multi_ui.cpp:678–712  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

676}
677
678int AutoConnectPXO() {
679 // char seldll[_MAX_PATH];
680 int iparg;
681 int portarg;
682 MultiDLLGameStarting = 0;
683 iparg = FindArg("-pxo");
684 if (!iparg) {
685 return 0;
686 }
687
688 strcpy(Auto_login_addr, GameArgs[iparg + 1]);
689
690 char *port = strchr(Auto_login_addr, ':');
691 if (port) {
692 // terminate the hostname
693 *port = '\0';
694 // Increment to the first character of the port name
695 port++;
696 // get the port number
697 strcpy(Auto_login_port, port);
698 } else {
699 portarg = FindArg("port");
700 if (portarg) {
701 strcpy(Auto_login_port, GameArgs[portarg + 1]);
702 } else {
703 Auto_login_port[0] = '\0';
704 }
705 }
706
707 // ddio_MakePath(seldll,Base_directory,"online","parallax online.d3c",NULL);
708 if (LoadMultiDLL("parallax online")) {
709 CallMultiDLL(MT_AUTO_LOGIN);
710 }
711 return MultiDLLGameStarting;
712}
713
714int AutoConnectLANIP() {
715 // char seldll[_MAX_PATH];

Callers 1

ProcessCommandLineFunction · 0.85

Calls 3

LoadMultiDLLFunction · 0.85
CallMultiDLLFunction · 0.85
FindArgFunction · 0.70

Tested by

no test coverage detected