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

◆ TryConnect()

void CGame::TryConnect ( )
inlineprotected

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

2551 {
2552 if (GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2553 {
2554 SetGameState(DayZGameState.CONNECTING);
2555 OnlineServices.GetSession();
2556 }
2557 else
2558 {
2559 if (GetGameState() != DayZGameState.CONNECTING)
2560 {
2561 switch (GetLoadState())
2562 {
2563 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2564 {
2565 SetGameState(DayZGameState.CONNECTING);
2567 break;
2568 }
2569 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2570 {
2571 SetGameState(DayZGameState.CONNECTING);
2572 Connect();
2573 break;
2574 }
2575 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2576 {
2577 SetGameState(DayZGameState.CONNECTING);
2578 Connect();
2579 break;
2580 }
2581 }
2582 }
2583 else
2584 {
2585 string address;
2586 int port;
2587 if (GetHostAddress(address, port))
2588 {
2589 if (m_ConnectAddress == address && m_ConnectPort == port)
2590 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING_THIS);
2591 else
2592 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING, string.Format("%1:%2", address, port));
2593 }
2594 else
2595 {
2598 TryConnect();
2599 }
2600 }
2601 }
2602 }
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:2689
DayZGameState GetGameState()
Определения DayZGame.c:1331
int m_ConnectPort
Определения DayZGame.c:2132
void TryConnect()
Определения DayZGame.c:2550
void ConnectFromCLI()
Определения DayZGame.c:2783
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
string m_ConnectAddress
Определения DayZGame.c:2131
void Connect()
Определения DayZGame.c:2667
DayZLoadState GetLoadState()
Определения DayZGame.c:1341
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
void SetGameState(DayZGameState state)
Определения DayZGame.c:1326

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

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