When the clicked building has no upgrade chain (e.g. vanilla Rampart's
Mystic Pond), buildingClicked() passes the same BuildingID as both the
buildingToTest and buildingTarget arguments down to enterFountain().
The `upgrades != BuildingID::NONE` check then always passed, appending
the building's own description to itself.
Skip the extra append when `upgrades` points to the same building we're
already describing. When a mod actually upgrades Mystic Pond into a
separate building, the two IDs differ and the intended behavior of
showing both descriptions is preserved.
Fixes#7142
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).
Fixes cases where game would try to access file on real filesystem for
VCMI campaigns files that are actually located inside .zip archive.
Made search for other usages of last_write_time access, don't see any
other similar cases left
Normalize quoted local relative include directives to remove redundant
path segments while preserving relative includes.
This applies the normalizer across the tree and updates 108 includes in
64 files, including cases where paths inside lib/* redundantly used
../../lib/... and now correctly use ../... .
These paths compiled before because include resolution normalized them,
but they were longer and harder to audit.
Many quoted local includes had an incorrect ../ depth and resolved to
non-existent files from the including file's directory.
This was easy to miss because normal target include directories and PCH
usage masked some failures, and several stale paths lived in files that
are only compiled in optional test configurations. As a result, the
problem mostly surfaced in stricter or broader fresh builds.
Audit all C++ and header local includes, keep them relative, and adjust
paths so each include resolves to an existing in-tree header. For
headers that were renamed or moved, update includes to their current
relative location instead of switching to include-root form.
A few legacy ERM tests also used dynamic_ptr_cast at call sites where we
had to replace stale headers. The helper/header path they relied on is
no longer present after 81af66d35b, so
those downcasts are now explicit dynamic_cast calls with the same intent.
As discussed on Discord:
- NKAI has been removed since it is now superseded by NKAI 2
- fuzzy logic as well as fuzzylite library itself is also removed - it
was disabled in 1.5 release or so, and AI developers have no interest in
using it
Player that use NKAI1 should automatically switch to NKAI2
Fixed 1.7.2 regression of spellcaster logic when casting non-random
spells.
Slight refactoring of AI code to simplify logic related to SPELLCASTER.
As a side effect - AI should now be better at selecting spells if unit
has multiple spells to cast.