mirror of
https://gitea.msk.dinamika-avia.ru/Constanta-Design/RRJServer.git
synced 2026-03-28 19:55:48 +03:00
fix: first initialize
This commit is contained in:
@@ -48,19 +48,6 @@ void RecognizeSystem::recognize()
|
||||
{
|
||||
stream.startTransaction();
|
||||
|
||||
if(!isPackageTypeInited) //первичная инициализация для типа клиента
|
||||
{
|
||||
char *read = new char[4];
|
||||
stream.readRawData(read,4);
|
||||
|
||||
int numPackage = *((int*)read);
|
||||
packetType = static_cast<PacketType>(numPackage);
|
||||
packetTypeInit(packetType,client);
|
||||
|
||||
if(!stream.commitTransaction()) continue;
|
||||
continue;
|
||||
}
|
||||
|
||||
if(client->getClientType() == TypeClientAutorization::TYPE_UNITY_CLIENT)
|
||||
{
|
||||
char *read = new char[4];
|
||||
@@ -466,25 +453,6 @@ void RecognizeSystem::recognize()
|
||||
//mutex->unlock();
|
||||
}
|
||||
|
||||
void RecognizeSystem::packetTypeInit(PacketType packet,Client *client)
|
||||
{
|
||||
if(packet == PacketType::TYPE_QT)
|
||||
{
|
||||
client->setUnity(TypeClientAutorization::TYPE_QT_CLIENT);
|
||||
|
||||
qDebug() << "ConnectionType isUnity: " << client->getClientType();
|
||||
}
|
||||
else if (packet == PacketType::TYPE_UNITY)
|
||||
{
|
||||
client->setUnity(TypeClientAutorization::TYPE_UNITY_CLIENT);
|
||||
//Фиксируем время входа Юнити-клиента
|
||||
}
|
||||
|
||||
isPackageTypeInited = true;
|
||||
Logger::instance().log("C: " + client->getLogin() + " send pack " + enumToString(packetType));
|
||||
packetType = PacketType::TYPE_NONE;
|
||||
}
|
||||
|
||||
bool RecognizeSystem::checkIsChangeable()
|
||||
{
|
||||
return updateController->getCurrentVersion()->getIsChangeable();
|
||||
|
||||
Reference in New Issue
Block a user