mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-26 03:52:01 +02:00
Block AI from acting at the same time as guest-human during simturns
This commit is contained in:
parent
a19b3b61ad
commit
6300473ff8
@ -177,13 +177,16 @@ bool TurnOrderProcessor::computeCanActSimultaneously(PlayerColor active, PlayerC
|
|||||||
assert(activeInfo);
|
assert(activeInfo);
|
||||||
assert(waitingInfo);
|
assert(waitingInfo);
|
||||||
|
|
||||||
if (gameHandler->hasBothPlayersAtSameConnection(active, waiting))
|
if (activeInfo->human != waitingInfo->human)
|
||||||
{
|
{
|
||||||
|
// only one AI and one human can play simultaneoulsy from single connection
|
||||||
if (!gameHandler->getStartInfo()->simturnsInfo.allowHumanWithAI)
|
if (!gameHandler->getStartInfo()->simturnsInfo.allowHumanWithAI)
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
// only one AI and one human can play simultaneoulsy from single connection
|
else
|
||||||
if (activeInfo->human == waitingInfo->human)
|
{
|
||||||
|
// two AI or two humans in hotseat can't play at the same time
|
||||||
|
if (gameHandler->hasBothPlayersAtSameConnection(active, waiting))
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user