Pārlūkot izejas kodu

logout and disconnect clients

Kolja Strohm 3 gadi atpakaļ
vecāks
revīzija
755205ca8b
1 mainītis faili ar 4 papildinājumiem un 0 dzēšanām
  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 );
     } );
 }