-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feature/client-room-implementation #168
Conversation
Пока ещё вносятся исправления, вариант не конечный |
Нет, теперь вторую сессию хоть и можно создать, работать полноценно она пока не будет. Причины выясняются... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥 с кайфом
client/network_manager.cpp
Outdated
roomInfo.isHost = roomInfo.host_id == | ||
queryUserId; // using explicitly query user_id, as in | ||
// prod mode it is returned from the server |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
повторение meh, но ладно
|
||
public slots: | ||
void updateRoomInfo(const RoomInfo &roomInfo); | ||
void updateSessionInfo(const SessionInfo &sessionInfo); // Temporary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в чем temporary?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
По сути, уже даже в текущей версии сервера в RoomInfo есть сама SessionInfo, и отдельно её запрашивать по session_id не нужно, так что updateSessionInfo тут лежит до тех пор, пока я не перепишу (немного, на самом деле) на получение SessionInfo напрямую из RoomInfo
f9be121
to
d582c16
Compare
Клиент адаптирован под соответствующую ветку из сервера: #161
protoroomview разбит на roomview и sessionview.
Теперь на клиенте можно создать комнату и стать её хостом, в комнате можно, выбрав игру, создать сессию с этой игрой. Остальным участникам комнаты будет дана возможность присоединиться к новой сессии. В сессии всё почти как и раньше, но без invite-code. Хотя можно отобразить для удобства.
После закрытия QML-приложения пользователя возвращает на экран комнаты.
Баги на текущий момент: проблемы с созданием следующей сессии (у пользователей есть возможность зайти в закончившуюся сессию, а у хоста комнаты есть возможность создать новую сессию всегда).