1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

hide messages from AI

This commit is contained in:
Michael 2023-03-31 22:10:48 +02:00 committed by GitHub
parent a64f35c933
commit f7feeacc1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -4968,8 +4968,12 @@ bool CGameHandler::makeBattleAction(BattleAction &ba)
void CGameHandler::playerMessage(PlayerColor player, const std::string &message, ObjectInstanceID currObj)
{
bool cheated = false;
PlayerMessageClient temp_message(player, message);
sendAndApply(&temp_message);
if(!getPlayerSettings(player)->isControlledByAI())
{
PlayerMessageClient temp_message(player, message);
sendAndApply(&temp_message);
}
std::vector<std::string> words;
boost::split(words, message, boost::is_any_of(" "));