Browse Source

logout and disconnect clients

Kolja Strohm 3 years ago
parent
commit
755205ca8b
1 changed files with 4 additions and 0 deletions
  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 );
     } );
 }