1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-15 00:05:02 +02:00

case-insensitive cheats

This commit is contained in:
Michael
2023-05-20 01:14:06 +02:00
committed by GitHub
parent cb4cf224a9
commit 70bdec41a3

View File

@ -6870,6 +6870,9 @@ void CGameHandler::spawnWanderingMonsters(CreatureID creatureID)
void CGameHandler::handleCheatCode(std::string & cheat, PlayerColor player, const CGHeroInstance * hero, const CGTownInstance * town, bool & cheated)
{
//Make cheat case-insensitive
std::transform(cheat.begin(), cheat.end(), cheat.begin(), [](unsigned char c){ return std::tolower(c); });
if (cheat == "vcmiistari" || cheat == "vcmispells")
{
cheated = true;