Prevent turning on invincibility/slowdown in in-game options menu

Would've been the easiest exploit ever! But I gotta patch it.
This commit is contained in:
Misa
2020-06-22 17:37:53 -07:00
committed by Ethan Lee
parent a476121432
commit caa4f0f5c9
2 changed files with 26 additions and 10 deletions

View File

@@ -493,22 +493,38 @@ void menuactionpress()
break;
case 3:
//invincibility
if (!map.invincibility)
if (!game.ingame_titlemode || !game.inspecial())
{
game.createmenu(Menu::setinvincibility);
map.nexttowercolour();
if (!map.invincibility)
{
game.createmenu(Menu::setinvincibility);
map.nexttowercolour();
}
else
{
map.invincibility = !map.invincibility;
}
music.playef(11);
}
else
{
map.invincibility = !map.invincibility;
music.playef(2);
map.invincibility = false;
}
music.playef(11);
break;
case 4:
//change game speed
game.createmenu(Menu::setslowdown);
map.nexttowercolour();
music.playef(11);
if (!game.inspecial())
{
game.createmenu(Menu::setslowdown);
map.nexttowercolour();
music.playef(11);
}
else
{
music.playef(2);
game.gameframerate = 34;
}
break;
case 5:
// toggle fake load screen