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

Merge remote-tracking branch 'vcmi/develop' into lobby

This commit is contained in:
Ivan Savenko
2024-01-20 23:01:49 +02:00
192 changed files with 1119 additions and 1100 deletions

View File

@@ -32,7 +32,7 @@ FactionID PlayerSettings::getCastleValidated() const
{
if (!castle.isValid())
return FactionID(0);
if (castle.getNum() < VLC->townh->size() && VLC->townh->objects[castle.getNum()]->town != nullptr)
if (castle.getNum() < VLC->townh->size() && castle.toEntity(VLC)->hasTown())
return castle;
return FactionID(0);