Changelog: v0.2.8
This commit is contained in:
parent
4731ddc802
commit
cdc176a777
|
@ -2,6 +2,12 @@
|
|||
|
||||
___
|
||||
|
||||
## v0.2.8
|
||||
|
||||
修复测试0.2.7途中获得的bug。
|
||||
|
||||
___
|
||||
|
||||
## v0.2.7
|
||||
|
||||
1. 胜率直接写在脸上
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.16)
|
||||
|
||||
project(FreeKill VERSION 0.2.7)
|
||||
project(FreeKill VERSION 0.2.8)
|
||||
add_definitions(-DFK_VERSION=\"${CMAKE_PROJECT_VERSION}\")
|
||||
|
||||
find_package(Qt6 REQUIRED COMPONENTS
|
||||
|
|
|
@ -113,6 +113,7 @@ callbacks["EnterLobby"] = (jsonData) => {
|
|||
mainStack.pop();
|
||||
}
|
||||
mainWindow.busy = false;
|
||||
ClientInstance.notifyServer("RefreshRoomList", "");
|
||||
config.saveConf();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,6 +128,7 @@ Item {
|
|||
"surrender", true
|
||||
]);
|
||||
}
|
||||
surrenderDialog.close();
|
||||
break;
|
||||
}
|
||||
case MessageDialog.Cancel: {
|
||||
|
@ -141,7 +142,11 @@ Item {
|
|||
id: quitButton
|
||||
text: Backend.translate("Quit")
|
||||
onClicked: {
|
||||
quitDialog.open();
|
||||
if (config.observing) {
|
||||
ClientInstance.notifyServer("QuitRoom", "[]");
|
||||
} else {
|
||||
quitDialog.open();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.notify.FreeKill"
|
||||
android:installLocation="preferExternal"
|
||||
android:versionCode="207"
|
||||
android:versionName="0.2.7">
|
||||
android:versionCode="208"
|
||||
android:versionName="0.2.8">
|
||||
<uses-permission android:name="android.permission.INTERNET" />
|
||||
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
|
||||
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
|
||||
|
|
|
@ -109,6 +109,7 @@ ServerPlayer *Room::getOwner() const { return owner; }
|
|||
|
||||
void Room::setOwner(ServerPlayer *owner) {
|
||||
this->owner = owner;
|
||||
if (!owner) return;
|
||||
QJsonArray jsonData;
|
||||
jsonData << owner->getId();
|
||||
doBroadcastNotify(players, "RoomOwner", JsonArray2Bytes(jsonData));
|
||||
|
@ -177,13 +178,11 @@ void Room::addPlayer(ServerPlayer *player) {
|
|||
player->doNotify("UpdateGameData", JsonArray2Bytes(jsonData));
|
||||
}
|
||||
|
||||
/*
|
||||
if (this->owner != nullptr) {
|
||||
jsonData = QJsonArray();
|
||||
jsonData << this->owner->getId();
|
||||
player->doNotify("RoomOwner", JsonArray2Bytes(jsonData));
|
||||
}
|
||||
*/
|
||||
|
||||
if (player->getLastGameMode() != mode) {
|
||||
player->setLastGameMode(mode);
|
||||
|
@ -283,6 +282,7 @@ void Room::removePlayer(ServerPlayer *player) {
|
|||
if (isAbandoned()) {
|
||||
bool tmp = m_abandoned;
|
||||
m_abandoned = true;
|
||||
setOwner(nullptr);
|
||||
// 只释放一次信号就行了,他销毁机器人的时候会多次调用removePlayer
|
||||
if (!tmp) {
|
||||
emit abandoned();
|
||||
|
|
Loading…
Reference in New Issue