- bugfixes for network playername inline editing in the lobby during a slot switch
This commit is contained in:
parent
6fcf4295f1
commit
db173d0fdd
|
@ -331,7 +331,7 @@ void MenuStateConnectedGame::mouseClick(int x, int y, MouseButton mouseButton){
|
||||||
clientInterface->setGameSettingsReceived(false);
|
clientInterface->setGameSettingsReceived(false);
|
||||||
settingsReceivedFromServer=false;
|
settingsReceivedFromServer=false;
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] sending a switchSlot request from %d to %d\n",__FILE__,__FUNCTION__,__LINE__,clientInterface->getGameSettings()->getThisFactionIndex(),i);
|
SystemFlags::OutputDebug(SystemFlags::debugSystem,"In [%s::%s Line %d] sending a switchSlot request from %d to %d\n",__FILE__,__FUNCTION__,__LINE__,clientInterface->getGameSettings()->getThisFactionIndex(),i);
|
||||||
clientInterface->sendSwitchSetupRequest(listBoxFactions[myCurrentIndex].getSelectedItem(),myCurrentIndex,i,listBoxTeams[myCurrentIndex].getSelectedItemIndex(),getHumanPlayerName(),switchSetupRequestFlagType);
|
clientInterface->sendSwitchSetupRequest(listBoxFactions[myCurrentIndex].getSelectedItem(),myCurrentIndex,i,listBoxTeams[myCurrentIndex].getSelectedItemIndex(),labelPlayerNames[myCurrentIndex].getText(),switchSetupRequestFlagType);
|
||||||
switchSetupRequestFlagType=ssrft_None;
|
switchSetupRequestFlagType=ssrft_None;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -748,7 +748,8 @@ void MenuStateConnectedGame::update() {
|
||||||
if(gameSettings->getFactionControl(i) == ctNetwork ){
|
if(gameSettings->getFactionControl(i) == ctNetwork ){
|
||||||
labelNetStatus[slot].setText(gameSettings->getNetworkPlayerName(i));
|
labelNetStatus[slot].setText(gameSettings->getNetworkPlayerName(i));
|
||||||
if(gameSettings->getThisFactionIndex() != i &&
|
if(gameSettings->getThisFactionIndex() != i &&
|
||||||
gameSettings->getNetworkPlayerName(i) != "") {
|
gameSettings->getNetworkPlayerName(i) != "" &&
|
||||||
|
gameSettings->getNetworkPlayerName(i) != GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME) {
|
||||||
labelPlayerNames[slot].setText(gameSettings->getNetworkPlayerName(i));
|
labelPlayerNames[slot].setText(gameSettings->getNetworkPlayerName(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -761,7 +762,8 @@ void MenuStateConnectedGame::update() {
|
||||||
listBoxTeams[slot].setEditable(true);
|
listBoxTeams[slot].setEditable(true);
|
||||||
|
|
||||||
if(labelPlayerNames[slot].getText() == "" &&
|
if(labelPlayerNames[slot].getText() == "" &&
|
||||||
gameSettings->getNetworkPlayerName(i) != "") {
|
gameSettings->getNetworkPlayerName(i) != "" &&
|
||||||
|
gameSettings->getNetworkPlayerName(i) != GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME) {
|
||||||
labelPlayerNames[slot].setText(gameSettings->getNetworkPlayerName(i));
|
labelPlayerNames[slot].setText(gameSettings->getNetworkPlayerName(i));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -918,7 +918,7 @@ void ClientInterface::stopServerDiscovery() {
|
||||||
void ClientInterface::sendSwitchSetupRequest(string selectedFactionName, int8 currentFactionIndex,
|
void ClientInterface::sendSwitchSetupRequest(string selectedFactionName, int8 currentFactionIndex,
|
||||||
int8 toFactionIndex,int8 toTeam, string networkPlayerName,
|
int8 toFactionIndex,int8 toTeam, string networkPlayerName,
|
||||||
int8 flags) {
|
int8 flags) {
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] networkPlayerName [%s] flags = %d\n",__FILE__,__FUNCTION__,__LINE__,networkPlayerName.c_str(),flags);
|
||||||
//printf("string-cuf-tof-team= %s-%d-%d-%d\n",selectedFactionName.c_str(),currentFactionIndex,toFactionIndex,toTeam);
|
//printf("string-cuf-tof-team= %s-%d-%d-%d\n",selectedFactionName.c_str(),currentFactionIndex,toFactionIndex,toTeam);
|
||||||
SwitchSetupRequest message=SwitchSetupRequest(selectedFactionName, currentFactionIndex, toFactionIndex,toTeam,networkPlayerName, flags);
|
SwitchSetupRequest message=SwitchSetupRequest(selectedFactionName, currentFactionIndex, toFactionIndex,toTeam,networkPlayerName, flags);
|
||||||
sendMessage(&message);
|
sendMessage(&message);
|
||||||
|
|
|
@ -600,7 +600,7 @@ void ConnectionSlot::update(bool checkForNewClients) {
|
||||||
}
|
}
|
||||||
*(serverInterface->getSwitchSetupRequests()[factionIdx]) = switchSetupRequest;
|
*(serverInterface->getSwitchSetupRequests()[factionIdx]) = switchSetupRequest;
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] factionIdx = %d, switchSetupRequest.getNetworkPlayerName() = %s\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,switchSetupRequest.getNetworkPlayerName().c_str());
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] factionIdx = %d, switchSetupRequest.getNetworkPlayerName() [%s] switchSetupRequest.getSwitchFlags() = %d\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,switchSetupRequest.getNetworkPlayerName().c_str(),switchSetupRequest.getSwitchFlags());
|
||||||
|
|
||||||
if(mutex != NULL) mutex->v();
|
if(mutex != NULL) mutex->v();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user