mirror of
https://github.com/glest/glest-source.git
synced 2025-08-18 06:01:17 +02:00
- a few safety changes for network communication
- small tweaks for unit selection
This commit is contained in:
@@ -208,10 +208,10 @@ void ClientInterface::update() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch(const megaglest_runtime_error &ex) {
|
catch(const megaglest_runtime_error &ex) {
|
||||||
if(this->isConnected() == false) {
|
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||||
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
SystemFlags::OutputDebug(SystemFlags::debugError,"In [%s::%s Line: %d] Error [%s]\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__,ex.what());
|
||||||
|
|
||||||
|
if(this->isConnected() == false) {
|
||||||
if(gotIntro == false || wasConnected == false) {
|
if(gotIntro == false || wasConnected == false) {
|
||||||
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what());
|
string sErr = string(extractFileFromDirectoryPath(__FILE__).c_str()) + "::" + string(__FUNCTION__) + " network error: " + string(ex.what());
|
||||||
DisplayErrorMessage(sErr);
|
DisplayErrorMessage(sErr);
|
||||||
|
@@ -851,6 +851,7 @@ void ConnectionSlot::update(bool checkForNewClients,int lockedSlotIndex) {
|
|||||||
|
|
||||||
int minHeadLessPlayersRequired = Config::getInstance().getInt("MinHeadlessPlayersRequired","2");
|
int minHeadLessPlayersRequired = Config::getInstance().getInt("MinHeadlessPlayersRequired","2");
|
||||||
if(networkMessageLaunch.getMessageType() == nmtLaunch &&
|
if(networkMessageLaunch.getMessageType() == nmtLaunch &&
|
||||||
|
ready == false &&
|
||||||
this->serverInterface->getConnectedSlotCount(true) < minHeadLessPlayersRequired) {
|
this->serverInterface->getConnectedSlotCount(true) < minHeadLessPlayersRequired) {
|
||||||
Lang &lang= Lang::getInstance();
|
Lang &lang= Lang::getInstance();
|
||||||
const vector<string> languageList = this->serverInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
const vector<string> languageList = this->serverInterface->getGameSettings()->getUniqueNetworkPlayerLanguages();
|
||||||
|
@@ -1599,6 +1599,7 @@ vector<int> BaseColorPickEntity::getPickedList(int x,int y,int w,int h,
|
|||||||
static Chrono lastSnapshot(true);
|
static Chrono lastSnapshot(true);
|
||||||
const int selectionMillisecondUpdate = 100;
|
const int selectionMillisecondUpdate = 100;
|
||||||
|
|
||||||
|
if(rendererModels.empty() == false) {
|
||||||
if(PixelBufferWrapper::getIsPBOEnable() == true) {
|
if(PixelBufferWrapper::getIsPBOEnable() == true) {
|
||||||
// Only update the pixel buffer every x milliseconds or as required
|
// Only update the pixel buffer every x milliseconds or as required
|
||||||
if(cachedPixels.get() == NULL || cachedPixels->getW() != w+1 ||cachedPixels->getH() != h+1 ||
|
if(cachedPixels.get() == NULL || cachedPixels->getW() != w+1 ||cachedPixels->getH() != h+1 ||
|
||||||
@@ -1690,7 +1691,7 @@ vector<int> BaseColorPickEntity::getPickedList(int x,int y,int w,int h,
|
|||||||
|
|
||||||
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
//delete pixmapScreenShot;
|
//delete pixmapScreenShot;
|
||||||
|
}
|
||||||
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
//printf("In [%s::%s] Line: %d\n",extractFileFromDirectoryPath(__FILE__).c_str(),__FUNCTION__,__LINE__);
|
||||||
return pickedModels;
|
return pickedModels;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user