mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-17 10:52:46 +00:00
Replace port constants with a single port variable
- Remove really old deprecated constants - Remove some Cyanic server code as well
This commit is contained in:
@ -5143,14 +5143,14 @@ void NetCliAuthStartConnect (
|
||||
&cancelId,
|
||||
AsyncLookupCallback,
|
||||
authAddrList[i],
|
||||
kNetDefaultClientPort,
|
||||
GetClientPort(),
|
||||
nil
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!name[0]) {
|
||||
plNetAddress addr(authAddrList[i], kNetDefaultClientPort);
|
||||
plNetAddress addr(authAddrList[i], GetClientPort());
|
||||
Connect(authAddrList[i], addr);
|
||||
}
|
||||
}
|
||||
|
@ -1365,51 +1365,14 @@ void NetCliFileStartConnect (
|
||||
&cancelId,
|
||||
AsyncLookupCallback,
|
||||
fileAddrList[i],
|
||||
kNetDefaultClientPort,
|
||||
GetClientPort(),
|
||||
nil
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!name[0]) {
|
||||
plNetAddress addr(fileAddrList[i], kNetDefaultClientPort);
|
||||
Connect(fileAddrList[i], addr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//============================================================================
|
||||
void NetCliFileStartConnectAsServer (
|
||||
const char* fileAddrList[],
|
||||
uint32_t fileAddrCount,
|
||||
unsigned serverType,
|
||||
unsigned serverBuildId
|
||||
) {
|
||||
// TEMP: Only connect to one file server until we fill out this module
|
||||
// to choose the "best" file connection.
|
||||
fileAddrCount = std::min(fileAddrCount, 1u);
|
||||
s_connectBuildId = serverBuildId;
|
||||
s_serverType = serverType;
|
||||
|
||||
for (unsigned i = 0; i < fileAddrCount; ++i) {
|
||||
// Do we need to lookup the address?
|
||||
const char* name = fileAddrList[i];
|
||||
while (unsigned ch = *name) {
|
||||
++name;
|
||||
if (!(isdigit(ch) || ch == L'.' || ch == L':')) {
|
||||
AsyncCancelId cancelId;
|
||||
AsyncAddressLookupName(
|
||||
&cancelId,
|
||||
AsyncLookupCallback,
|
||||
fileAddrList[i],
|
||||
kNetDefaultClientPort,
|
||||
nil
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!name[0]) {
|
||||
plNetAddress addr(fileAddrList[i], kNetDefaultServerPort);
|
||||
plNetAddress addr(fileAddrList[i], GetClientPort());
|
||||
Connect(fileAddrList[i], addr);
|
||||
}
|
||||
}
|
||||
|
@ -66,12 +66,6 @@ void NetCliFileStartConnect (
|
||||
unsigned fileAddrCount,
|
||||
bool isPatcher = false
|
||||
);
|
||||
void NetCliFileStartConnectAsServer (
|
||||
const char* fileAddrList[],
|
||||
unsigned fileAddrCount,
|
||||
unsigned serverType,
|
||||
unsigned serverBuildId
|
||||
);
|
||||
|
||||
//============================================================================
|
||||
// Disconnect
|
||||
|
@ -801,7 +801,7 @@ void GamePingEnable (bool enable) {
|
||||
void NetCliGameStartConnect (
|
||||
const uint32_t node
|
||||
) {
|
||||
plNetAddress addr(node, kNetDefaultClientPort);
|
||||
plNetAddress addr(node, GetClientPort());
|
||||
Connect(addr);
|
||||
}
|
||||
|
||||
|
@ -1075,14 +1075,14 @@ void NetCliGateKeeperStartConnect (
|
||||
&cancelId,
|
||||
AsyncLookupCallback,
|
||||
gateKeeperAddrList[i],
|
||||
kNetDefaultClientPort,
|
||||
GetClientPort(),
|
||||
nil
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!name[0]) {
|
||||
plNetAddress addr(gateKeeperAddrList[i], kNetDefaultClientPort);
|
||||
plNetAddress addr(gateKeeperAddrList[i], GetClientPort());
|
||||
Connect(gateKeeperAddrList[i], addr);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user