1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00

Allow one AI and human to act simultaneously

This commit is contained in:
Ivan Savenko
2023-09-18 22:09:16 +03:00
parent b89fa254fc
commit b2f30f78fa
4 changed files with 46 additions and 7 deletions

View File

@@ -2188,6 +2188,11 @@ bool CGameHandler::hasPlayerAt(PlayerColor player, std::shared_ptr<CConnection>
return connections.at(player).count(c);
}
bool CGameHandler::hasBothPlayersAtSameConnection(PlayerColor left, PlayerColor right) const
{
return connections.at(left) == connections.at(right);
}
bool CGameHandler::disbandCreature(ObjectInstanceID id, SlotID pos)
{
const CArmedInstance * s1 = static_cast<const CArmedInstance *>(getObjInstance(id));