mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
* moved CConsoleHandler to lib (update project files)
* using winapi for better console handling with MSVC (I hope I didn't break anything at GCC) * new logging system (use log0 - log5 for different priorities and colors (at msvc)) * using lists for storing activated interface objects * more proper closing of server
This commit is contained in:
@@ -338,6 +338,11 @@ void CGameHandler::handleConnection(std::set<int> players, CConnection &c)
|
||||
bool blockvis = false;
|
||||
switch(pom)
|
||||
{
|
||||
case 99: //end!
|
||||
{
|
||||
log0 << "We have been requested to close.\n";
|
||||
exit(0);
|
||||
}
|
||||
case 100: //my interface ended its turn
|
||||
{
|
||||
states.setFlag(gs->currentPlayer,&PlayerStatus::makingTurn,false);
|
||||
@@ -953,12 +958,12 @@ upgend:
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cerr << e.what() << std::endl;
|
||||
log1 << e.what() << std::endl;
|
||||
end2 = true;
|
||||
}
|
||||
catch (const std::exception * e)
|
||||
{
|
||||
std::cerr << e->what()<< std::endl;
|
||||
log1 << e->what()<< std::endl;
|
||||
end2 = true;
|
||||
delete e;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user