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

◆ TryConnect()

void CGame::TryConnect ( )
inlineprotected

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

2595 {
2596 if (GetLoadState() == DayZLoadState.JOIN_CONTROLLER_SELECT)
2597 {
2598 SetGameState(DayZGameState.CONNECTING);
2599 OnlineServices.GetSession();
2600 }
2601 else
2602 {
2603 if (GetGameState() != DayZGameState.CONNECTING)
2604 {
2605 switch (GetLoadState())
2606 {
2607 case DayZLoadState.CONNECT_CONTROLLER_SELECT:
2608 {
2609 SetGameState(DayZGameState.CONNECTING);
2611 break;
2612 }
2613 case DayZLoadState.PARTY_CONTROLLER_SELECT:
2614 {
2615 SetGameState(DayZGameState.CONNECTING);
2616 Connect();
2617 break;
2618 }
2619 case DayZLoadState.MAIN_MENU_CONTROLLER_SELECT:
2620 {
2621 SetGameState(DayZGameState.CONNECTING);
2622 Connect();
2623 break;
2624 }
2625 }
2626 }
2627 else
2628 {
2629 string address;
2630 int port;
2631 if (GetHostAddress(address, port))
2632 {
2633 if (m_ConnectAddress == address && m_ConnectPort == port)
2634 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING_THIS);
2635 else
2636 ErrorModuleHandler.ThrowError(ErrorCategory.ConnectErrorScript, EConnectErrorScript.ALREADY_CONNECTING, string.Format("%1:%2", address, port));
2637 }
2638 else
2639 {
2642 TryConnect();
2643 }
2644 }
2645 }
2646 }
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:2733
DayZGameState GetGameState()
Определения DayZGame.c:1366
int m_ConnectPort
Определения DayZGame.c:2171
void TryConnect()
Определения DayZGame.c:2594
void ConnectFromCLI()
Определения DayZGame.c:2827
proto bool GetHostAddress(out string address, out int port)
Gets the server address. (from client)
string m_ConnectAddress
Определения DayZGame.c:2170
void Connect()
Определения DayZGame.c:2711
DayZLoadState GetLoadState()
Определения DayZGame.c:1376
proto native void DisconnectSessionForce()
Forces disconnect from current multiplayer session even if not yet in the game.
void SetGameState(DayZGameState state)
Определения DayZGame.c:1361

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

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