- fixed changing username in the lobby
This commit is contained in:
parent
5648080095
commit
8f2613e216
|
@ -737,6 +737,9 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
||||||
*(serverInterface->getSwitchSetupRequests()[factionIdx]) = switchSetupRequest;
|
*(serverInterface->getSwitchSetupRequests()[factionIdx]) = switchSetupRequest;
|
||||||
|
|
||||||
this->playerStatus = switchSetupRequest.getNetworkPlayerStatus();
|
this->playerStatus = switchSetupRequest.getNetworkPlayerStatus();
|
||||||
|
this->name = switchSetupRequest.getNetworkPlayerName();
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] networkPlayerName [%s]\n",__FILE__,__FUNCTION__,__LINE__,serverInterface->getSwitchSetupRequests()[factionIdx]->getNetworkPlayerName().c_str());
|
||||||
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] factionIdx = %d, switchSetupRequest.getNetworkPlayerName() [%s] switchSetupRequest.getNetworkPlayerStatus() = %d, switchSetupRequest.getSwitchFlags() = %d\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,switchSetupRequest.getNetworkPlayerName().c_str(),switchSetupRequest.getNetworkPlayerStatus(),switchSetupRequest.getSwitchFlags());
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] factionIdx = %d, switchSetupRequest.getNetworkPlayerName() [%s] switchSetupRequest.getNetworkPlayerStatus() = %d, switchSetupRequest.getSwitchFlags() = %d\n",__FILE__,__FUNCTION__,__LINE__,factionIdx,switchSetupRequest.getNetworkPlayerName().c_str(),switchSetupRequest.getNetworkPlayerStatus(),switchSetupRequest.getSwitchFlags());
|
||||||
}
|
}
|
||||||
|
|
|
@ -995,11 +995,16 @@ bool SwitchSetupRequest::receive(Socket* socket) {
|
||||||
data.selectedFactionName.nullTerminate();
|
data.selectedFactionName.nullTerminate();
|
||||||
data.networkPlayerName.nullTerminate();
|
data.networkPlayerName.nullTerminate();
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] data.networkPlayerName [%s]\n",__FILE__,__FUNCTION__,__LINE__,data.networkPlayerName.getString().c_str());
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
void SwitchSetupRequest::send(Socket* socket) const {
|
void SwitchSetupRequest::send(Socket* socket) const {
|
||||||
assert(data.messageType==nmtSwitchSetupRequest);
|
assert(data.messageType==nmtSwitchSetupRequest);
|
||||||
|
|
||||||
|
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line %d] data.networkPlayerName [%s]\n",__FILE__,__FUNCTION__,__LINE__,data.networkPlayerName.getString().c_str());
|
||||||
|
|
||||||
NetworkMessage::send(socket, &data, sizeof(data));
|
NetworkMessage::send(socket, &data, sizeof(data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user