瀏覽代碼

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 );
     } );
 }