Major design change in network protocol: Player information is now requested by clients whenever it is needed. The server only sends player ids. The client has a cache with player information.
This commit is contained in:
@@ -74,6 +74,14 @@ void startNetworkGameDialogImpl::addConnectedPlayer(QString playerName, int righ
|
||||
checkPlayerQuantity();
|
||||
}
|
||||
|
||||
void startNetworkGameDialogImpl::updatePlayer(QString oldPlayerName, QString newPlayerName)
|
||||
{
|
||||
QList<QTreeWidgetItem *> list = treeWidget->findItems(oldPlayerName, Qt::MatchExactly, 0);
|
||||
if(!list.empty()) {
|
||||
list[0]->setText(0, newPlayerName);
|
||||
}
|
||||
}
|
||||
|
||||
void startNetworkGameDialogImpl::removePlayer(QString playerName) {
|
||||
|
||||
QList<QTreeWidgetItem *> list = treeWidget->findItems(playerName, Qt::MatchExactly, 0);
|
||||
|
||||
Reference in New Issue
Block a user