소스 검색

logout and disconnect clients

Kolja Strohm 3 년 전
부모
커밋
755205ca8b
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      FactoryCraft/Server.cpp

+ 4 - 0
FactoryCraft/Server.cpp

@@ -228,6 +228,8 @@ void FCKlient::setForegroundClient( SKlient* foreground )
             if( !zGameClient )
                 Sleep( 100 );
         }
+        zGameClient->logout();
+        ls->removeKlient( this );
     } );
 }
 
@@ -244,6 +246,8 @@ void FCKlient::setBackgroundClient( SKlient* background )
             if( !zGameClient )
                 Sleep( 100 );
         }
+        zGameClient->logout();
+        ls->removeKlient( this );
     } );
 }