mirror of
https://github.com/glest/glest-source.git
synced 2025-09-30 17:39:02 +02:00
- bugfix for cell markers to avoid out of synch
This commit is contained in:
@@ -496,7 +496,9 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
this->clearChatInfo();
|
this->clearChatInfo();
|
||||||
|
|
||||||
bool gotTextMsg = true;
|
bool gotTextMsg = true;
|
||||||
for(;this->hasDataToRead() == true && gotTextMsg == true;) {
|
bool gotCellMarkerMsg = true;
|
||||||
|
for(;this->hasDataToRead() == true &&
|
||||||
|
(gotTextMsg == true || gotCellMarkerMsg == true);) {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] polling for networkMessageType...\n",__FILE__,__FUNCTION__,__LINE__);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] polling for networkMessageType...\n",__FILE__,__FUNCTION__,__LINE__);
|
||||||
|
|
||||||
NetworkMessageType networkMessageType= getNextMessageType();
|
NetworkMessageType networkMessageType= getNextMessageType();
|
||||||
@@ -504,6 +506,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] networkMessageType = %d\n",__FILE__,__FUNCTION__,__LINE__,networkMessageType);
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] networkMessageType = %d\n",__FILE__,__FUNCTION__,__LINE__,networkMessageType);
|
||||||
|
|
||||||
gotTextMsg = false;
|
gotTextMsg = false;
|
||||||
|
gotCellMarkerMsg = false;
|
||||||
//process incoming commands
|
//process incoming commands
|
||||||
switch(networkMessageType) {
|
switch(networkMessageType) {
|
||||||
|
|
||||||
@@ -572,7 +575,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
networkMessageMarkCell.getText().c_str());
|
networkMessageMarkCell.getText().c_str());
|
||||||
|
|
||||||
this->addMarkedCell(msg);
|
this->addMarkedCell(msg);
|
||||||
//gotTextMsg = true;
|
gotCellMarkerMsg = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d]\nInvalid message type before intro handshake [%d]\nDisconnecting socket for slot: %d [%s].\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,networkMessageType,this->playerIndex,this->getIpAddress().c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d]\nInvalid message type before intro handshake [%d]\nDisconnecting socket for slot: %d [%s].\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,networkMessageType,this->playerIndex,this->getIpAddress().c_str());
|
||||||
@@ -601,7 +604,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
networkMessageMarkCell.getFactionIndex());
|
networkMessageMarkCell.getFactionIndex());
|
||||||
|
|
||||||
this->addUnMarkedCell(msg);
|
this->addUnMarkedCell(msg);
|
||||||
//gotTextMsg = true;
|
gotCellMarkerMsg = true;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d]\nInvalid message type before intro handshake [%d]\nDisconnecting socket for slot: %d [%s].\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,networkMessageType,this->playerIndex,this->getIpAddress().c_str());
|
if(SystemFlags::getSystemSettingType(SystemFlags::debugError).enabled) SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d]\nInvalid message type before intro handshake [%d]\nDisconnecting socket for slot: %d [%s].\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,networkMessageType,this->playerIndex,this->getIpAddress().c_str());
|
||||||
|
Reference in New Issue
Block a user