- fixes for some threading shutdown bugs

- We now display when a screenshot is taken in game showing an ingame console message
- Updated AI to attack closest attackers
- Updated found enemy to be closest attacker
This commit is contained in:
Mark Vejvoda
2011-03-28 21:04:47 +00:00
parent 8be4bafdcf
commit 3ed636aae2
20 changed files with 514 additions and 80 deletions

View File

@@ -67,12 +67,16 @@ FTPServerThread::FTPServerThread(std::pair<string,string> mapsPath,
}
FTPServerThread::~FTPServerThread() {
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
ftpShutdown();
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
// Remove any UPNP port forwarded ports
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort());
for(int clientIndex = 1; clientIndex <= maxPlayers; ++clientIndex) {
UPNP_Tools::upnp_rem_redirect(ServerSocket::getFTPServerPort() + clientIndex);
}
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d]\n",__FILE__,__FUNCTION__,__LINE__);
}
void FTPServerThread::signalQuit() {
@@ -227,6 +231,7 @@ void FTPServerThread::execute() {
}
if(SystemFlags::getSystemSettingType(SystemFlags::debugNetwork).enabled) SystemFlags::OutputDebug(SystemFlags::debugNetwork,"In [%s::%s Line: %d] FTP Server thread is exiting\n",__FILE__,__FUNCTION__,__LINE__);
if(SystemFlags::VERBOSE_MODE_ENABLED) printf("In [%s::%s Line: %d] FTP Server thread is exiting\n",__FILE__,__FUNCTION__,__LINE__);
}
}