mirror of
https://github.com/glest/glest-source.git
synced 2025-02-25 12:12:25 +01:00
- 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);
|
||||
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);
|
||||
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;
|
||||
break;
|
||||
}
|
||||
@ -748,7 +748,8 @@ void MenuStateConnectedGame::update() {
|
||||
if(gameSettings->getFactionControl(i) == ctNetwork ){
|
||||
labelNetStatus[slot].setText(gameSettings->getNetworkPlayerName(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));
|
||||
}
|
||||
}
|
||||
@ -761,7 +762,8 @@ void MenuStateConnectedGame::update() {
|
||||
listBoxTeams[slot].setEditable(true);
|
||||
|
||||
if(labelPlayerNames[slot].getText() == "" &&
|
||||
gameSettings->getNetworkPlayerName(i) != "") {
|
||||
gameSettings->getNetworkPlayerName(i) != "" &&
|
||||
gameSettings->getNetworkPlayerName(i) != GameConstants::NETWORK_SLOT_UNCONNECTED_SLOTNAME) {
|
||||
labelPlayerNames[slot].setText(gameSettings->getNetworkPlayerName(i));
|
||||
}
|
||||
}
|
||||
|
@ -918,7 +918,7 @@ void ClientInterface::stopServerDiscovery() {
|
||||
void ClientInterface::sendSwitchSetupRequest(string selectedFactionName, int8 currentFactionIndex,
|
||||
int8 toFactionIndex,int8 toTeam, string networkPlayerName,
|
||||
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);
|
||||
SwitchSetupRequest message=SwitchSetupRequest(selectedFactionName, currentFactionIndex, toFactionIndex,toTeam,networkPlayerName, flags);
|
||||
sendMessage(&message);
|
||||
|
@ -600,7 +600,7 @@ void ConnectionSlot::update(bool checkForNewClients) {
|
||||
}
|
||||
*(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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user