That wouldn't be as big issue if problem affected few files, but it everywhere in codebase.
Fixed it everywhere since in most files that is the only code with wrong indentation.
The control flows the following way:
- we receive SDL_KEYDOWN with letter 's' in the adventure map interface
- save dialog opens
- text input receives focus
- text input enables receiving SDL_KeyboardEvent-s which go between DOWN and UP
- the button on keyboard becomes UP (the menu opens very fast)
- text input receives SDL_KeyboardEvent and inserts 's'
- text input receives SDL_KEYUP
So the apparent fix is to open the save dialog on SDL_KEYUP event
If quick combat calculation take a while it's possible to give hero movement command before battle is finished. This will lead to client freeze or crash. To avoid this we must lock adventure interface until battle calculation is finished.
Long time ago it's was used without prefix to make future switch from boost to std version easier.
I discusses this with Ivan and decide to drop these using from Global.h now.
This change wouldn't break anything because there was already code with prefix for each of three cases.
Related movement code for client and AI is plumbed as well. Though at moment code still not finished because it's not teleport hero to the exit tile if he won battle.
We also now check not number of towns, but only towns that has tavern built. Also according to original mechanics all taverns always display information based on your number of taverns and not number of taverns of object owner.
CTerrainRect::showPath behaviour changed so it's will only add cross path graphics on embark/disembark and path ending.
We want continuous paths for flying and water walking even when land<-> water transition occur.
This still need investigation, but likely most of external code shouldn't be aware of layers in order to work properly because only LAND and SAIL can be targeted and single tile can't have both of these layers.
This is how that works in H3. And on server side it's checked already anyway.
Though it's must be possible to teleport from ally Inferno to your own if both have Castle Gate.