waitForServerShutdown() was blocking on serverRunner->wait() while
holding interfaceMutex, preventing the GUI thread from processing
events or rendering frames. This caused the highscore name entry
screen to freeze after winning a game.
Release interfaceMutex during the blocking wait using makeUnlockGuard,
matching the existing pattern in endNetwork().
Also fix [&] lambda capture in the highscore input callback to [this]
to avoid a dangling reference to a stack variable (cursorPosition).
- add LobbyQuickLoad pack
- add hotkeys F8, F9 to adventure map and battle
- check whether quick save matches current settings
- ask before quick load
- notify about quick save
- use CResourceHandler for file existence test
- update localization
- externalize buttons to vcmi-extras
- event processing is now initiated by GameEngine instead of weird chain
engine -> player interface -> engine
- introduced GameEngineUser interface (implemented by GameInstance) to
remove mutual depedency between GameEngine and GameInstance (some
technically still remains for now, in form of some free functions)
Always use TCP connection when connecting to self-hosted lobby room.
Effectively reverts 1.6.6 change for lobby connections. Single-player
connections still use intra-process pseudo connection
Main problem is various side effects caused by changing order of
operations. For example, client may inform lobby about joining the room
before server finishes startup, which was not possible before.
- class CGuiHandler is now called GameEngine to better describe its
functionality
- renamed global GH to more clear ENGINE
- GH/ENGINE is now unique_ptr to make construction / deconstruction
order more clear and to allow interface / implementation split
- CGuiHandler.cpp/h is now called GameEngine.cpp/h and located in root
directory of client dir
This removes need for TCP network connection in single-player games.
Instead, game will now create internal pseudo-connection that performs
client<->server communication by posting sent messages to client/server
asio::io_service'a.
This should fix gameplay aborting on switching to another app on iOS (and
apparently, on Android in some cases)