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

Merge pull request #3372 from IvanSavenko/bugfixing

[1.4.2] Bugfixing
This commit is contained in:
Ivan Savenko
2023-12-23 22:05:39 +02:00
committed by GitHub
11 changed files with 100 additions and 43 deletions

View File

@@ -2225,12 +2225,12 @@ bool CGameHandler::arrangeStacks(ObjectInstanceID id1, ObjectInstanceID id2, ui8
bool CGameHandler::hasPlayerAt(PlayerColor player, std::shared_ptr<CConnection> c) const
{
return connections.at(player).count(c);
return connections.count(player) && connections.at(player).count(c);
}
bool CGameHandler::hasBothPlayersAtSameConnection(PlayerColor left, PlayerColor right) const
{
return connections.at(left) == connections.at(right);
return connections.count(left) && connections.count(right) && connections.at(left) == connections.at(right);
}
bool CGameHandler::disbandCreature(ObjectInstanceID id, SlotID pos)