DayZ 1.27
DayZ Explorer by KGB
 
Загрузка...
Поиск...
Не найдено

◆ TryConnect()

void CGame::TryConnect ( )
inlineprotected

См. определение в файле DayZGame.c строка 2528

2529 {
2530 if (GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2531 {
2532 SetGameState(DayZGameState.CONNECTING);
2533 OnlineServices.GetSession();
2534 }
2535 else
2536 {
2537 if (GetGameState() != DayZGameState.CONNECTING)
2538 {
2539 switch (GetLoadState())
2540 {
2541 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2542 {
2543 SetGameState(DayZGameState.CONNECTING);
2545 break;
2546 }
2547 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2548 {
2549 SetGameState(DayZGameState.CONNECTING);
2550 Connect();
2551 break;
2552 }
2553 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2554 {
2555 SetGameState(DayZGameState.CONNECTING);
2556 Connect();
2557 break;
2558 }
2559 }
2560 }
2561 else
2562 {
2563 string address;
2564 int port;
2565 if (GetHostAddress(address, port))
2566 {
2567 if (m_ConnectAddress == address && m_ConnectPort == port)
2568 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING_THIS);
2569 else
2570 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING, string.Format("%1:%2", address, port));
2571 }
2572 else
2573 {
2576 TryConnect();
2577 }
2578 }
2579 }
2580 }
EConnectErrorScript
Определения ConnectErrorScriptModule.c:2
ErrorCategory
ErrorCategory - To decide what ErrorHandlerModule needs to be called and easily identify where it cam...
Определения ErrorModuleHandler.c:5
void DisconnectSessionScript(bool displayJoinError=false)
Определения DayZGame.c:2667
DayZGameState GetGameState()
Определения DayZGame.c:1320
int m_ConnectPort
Определения DayZGame.c:2120
void TryConnect()
Определения DayZGame.c:2528
void ConnectFromCLI()
Определения DayZGame.c:2761
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
string m_ConnectAddress
Определения DayZGame.c:2119
void Connect()
Определения DayZGame.c:2645
DayZLoadState GetLoadState()
Определения DayZGame.c:1330
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
void SetGameState(DayZGameState state)
Определения DayZGame.c:1315

Перекрестные ссылки Connect(), ConnectFromCLI(), DisconnectSessionForce(), DisconnectSessionScript(), GetGameState(), GetHostAddress(), GetLoadState(), OnlineServices::GetSession(), m_ConnectAddress, m_ConnectPort, SetGameState(), ErrorModuleHandler::ThrowError() и TryConnect().

Используется в TryConnect().