mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-15 20:03:15 +02:00
show cheating problem message only once per AI
This commit is contained in:
@@ -77,6 +77,7 @@ AIGateway::AIGateway()
|
|||||||
destinationTeleport = ObjectInstanceID();
|
destinationTeleport = ObjectInstanceID();
|
||||||
destinationTeleportPos = int3(-1);
|
destinationTeleportPos = int3(-1);
|
||||||
nullkiller.reset(new Nullkiller());
|
nullkiller.reset(new Nullkiller());
|
||||||
|
announcedCheatingProblem = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
AIGateway::~AIGateway()
|
AIGateway::~AIGateway()
|
||||||
@@ -831,7 +832,11 @@ void AIGateway::makeTurn()
|
|||||||
if(cb->getStartInfo()->extraOptionsInfo.cheatsAllowed)
|
if(cb->getStartInfo()->extraOptionsInfo.cheatsAllowed)
|
||||||
cb->sendMessage("vcmieagles");
|
cb->sendMessage("vcmieagles");
|
||||||
else
|
else
|
||||||
cb->sendMessage("Nullkiller AI currently requires the ability to cheat in order to function correctly! Please enable!");
|
{
|
||||||
|
if(!announcedCheatingProblem)
|
||||||
|
cb->sendMessage("Nullkiller AI currently requires the ability to cheat in order to function correctly! Please enable!");
|
||||||
|
announcedCheatingProblem = true;
|
||||||
|
}
|
||||||
|
|
||||||
retrieveVisitableObjs();
|
retrieveVisitableObjs();
|
||||||
|
|
||||||
|
@@ -96,6 +96,7 @@ public:
|
|||||||
std::unique_ptr<boost::thread> makingTurn;
|
std::unique_ptr<boost::thread> makingTurn;
|
||||||
private:
|
private:
|
||||||
boost::mutex turnInterruptionMutex;
|
boost::mutex turnInterruptionMutex;
|
||||||
|
bool announcedCheatingProblem;
|
||||||
public:
|
public:
|
||||||
ObjectInstanceID selectedObject;
|
ObjectInstanceID selectedObject;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user