1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

* Probably fixed #655.

* Fixed #736, #737.
* Fixed crash on loss/victory.
* Fixed crash on loading some AB maps.
* Fixed crash on loading map where victory/loss condition objective hero was placed inside the town.
* Fixed crash on loading map when neutral Dungeon has built Portal of Summoning.
* Mutex protecting GS will be used to prevent changes in GS when GUI might read it.
* Little more securities around moving hero and ending turn, still needed more.
This commit is contained in:
Michał W. Urbańczyk
2011-05-29 23:49:25 +00:00
parent 936005aa1c
commit 2d61fab7e9
13 changed files with 109 additions and 43 deletions

View File

@@ -201,6 +201,10 @@ void CClient::endGame( bool closeConnection /*= true*/ )
{
// Game is ending
// Tell the network thread to reach a stable state
if(closeConnection)
stopConnection();
tlog0 << "Closed connection." << std::endl;
GH.curInt = NULL;
LOCPLINT->terminate_cond.setn(true);
LOCPLINT->pim->lock();
@@ -213,6 +217,7 @@ void CClient::endGame( bool closeConnection /*= true*/ )
GH.statusbar = NULL;
tlog0 << "Removed GUI." << std::endl;
delete CGI->mh;
const_cast<CGameInfo*>(CGI)->mh = NULL;
@@ -235,9 +240,6 @@ void CClient::endGame( bool closeConnection /*= true*/ )
}
tlog0 << "Deleted playerInts." << std::endl;
if(closeConnection)
stopConnection();
tlog0 << "Client stopped." << std::endl;
}