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:
parent
cb4cf224a9
commit
70bdec41a3
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user