bugfix
This commit is contained in:
@@ -52,37 +52,37 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
|||||||
//only active players are allowed to start a vote
|
//only active players are allowed to start a vote
|
||||||
if((*it)->getMyActiveStatus()) {
|
if((*it)->getMyActiveStatus()) {
|
||||||
|
|
||||||
// if(myW->getGuestMode()) {
|
// if(myW->getGuestMode()) {
|
||||||
//excpetions for client is logged in as guest
|
//excpetions for client is logged in as guest
|
||||||
|
|
||||||
//TODO diese RIESENSAUEREI aufräumen!!!
|
//TODO diese RIESENSAUEREI aufräumen!!!
|
||||||
|
|
||||||
// Game *currentGame = myW->getSession()->getCurrentGame();
|
// Game *currentGame = myW->getSession()->getCurrentGame();
|
||||||
// PlayerListConstIterator it_c;
|
// PlayerListConstIterator it_c;
|
||||||
// int activePlayerCounter=0;
|
// int activePlayerCounter=0;
|
||||||
|
|
||||||
// setVoteOnKickContextMenuEnabled(FALSE);
|
// setVoteOnKickContextMenuEnabled(FALSE);
|
||||||
// action_IgnorePlayer->setEnabled(FALSE);
|
// action_IgnorePlayer->setEnabled(FALSE);
|
||||||
|
|
||||||
// if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET) {
|
// if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET) {
|
||||||
// action_ReportBadAvatar->setVisible(TRUE);
|
// action_ReportBadAvatar->setVisible(TRUE);
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
// action_ReportBadAvatar->setVisible(FALSE);
|
// action_ReportBadAvatar->setVisible(FALSE);
|
||||||
// }
|
// }
|
||||||
|
|
||||||
// int i=0;
|
// int i=0;
|
||||||
// for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
// for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
||||||
|
|
||||||
// //also inactive player which stays on table can be voted to kick
|
// //also inactive player which stays on table can be voted to kick
|
||||||
// if(myContextMenuEnabled && myId != 0 && myId == i && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER && ( (*it_c)->getMyActiveStatus() || (*it_c)->getMyStayOnTableStatus() ) && !(QString::fromUtf8((*it_c)->getMyAvatar().c_str()).isEmpty()) )
|
// if(myContextMenuEnabled && myId != 0 && myId == i && (*it_c)->getMyType() != PLAYER_TYPE_COMPUTER && ( (*it_c)->getMyActiveStatus() || (*it_c)->getMyStayOnTableStatus() ) && !(QString::fromUtf8((*it_c)->getMyAvatar().c_str()).isEmpty()) )
|
||||||
// showContextMenu(event->globalPos());
|
// showContextMenu(event->globalPos());
|
||||||
|
|
||||||
// i++;
|
// i++;
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
// else {
|
// else {
|
||||||
//normal player mode in internet game
|
//normal player mode in internet game
|
||||||
|
|
||||||
Game *currentGame = myW->getSession()->getCurrentGame();
|
Game *currentGame = myW->getSession()->getCurrentGame();
|
||||||
PlayerListConstIterator it_c;
|
PlayerListConstIterator it_c;
|
||||||
@@ -105,19 +105,22 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
|||||||
int j=0;
|
int j=0;
|
||||||
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
||||||
|
|
||||||
if(myId == j && myW->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest) {
|
if(myId == j) {
|
||||||
action_IgnorePlayer->setDisabled(true);
|
|
||||||
|
if(myW->getSession()->getClientPlayerInfo((*it_c)->getMyUniqueID()).isGuest) {
|
||||||
|
action_IgnorePlayer->setDisabled(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !((*it_c)->getMyAvatar().empty()) ) {
|
||||||
|
action_ReportBadAvatar->setVisible(TRUE);
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
action_ReportBadAvatar->setVisible(FALSE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
j++;
|
j++;
|
||||||
}
|
}
|
||||||
|
|
||||||
if(myW->getSession()->getGameType() == Session::GAME_TYPE_INTERNET && !(QString::fromUtf8((*it_c)->getMyAvatar().c_str()).isEmpty()) ) {
|
|
||||||
action_ReportBadAvatar->setVisible(TRUE);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
action_ReportBadAvatar->setVisible(FALSE);
|
|
||||||
}
|
|
||||||
|
|
||||||
int i=0;
|
int i=0;
|
||||||
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
for (it_c=currentGame->getSeatsList()->begin(); it_c!=currentGame->getSeatsList()->end(); it_c++) {
|
||||||
|
|
||||||
@@ -127,8 +130,6 @@ void MyAvatarLabel::contextMenuEvent ( QContextMenuEvent *event ) {
|
|||||||
|
|
||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -251,7 +252,7 @@ void MyAvatarLabel::reportBadAvatar() {
|
|||||||
QMessageBox::Yes | QMessageBox::No);
|
QMessageBox::Yes | QMessageBox::No);
|
||||||
if(ret) {
|
if(ret) {
|
||||||
QFileInfo fi(avatar);
|
QFileInfo fi(avatar);
|
||||||
myW->getSession()->reportBadAvatar((*it_c)->getMyUniqueID(), fi.baseName().toStdString());
|
myW->getSession()->reportBadAvatar((*it_c)->getMyUniqueID(), fi.baseName().toStdString());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user