1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-19 21:10:12 +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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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;