1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

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

@ -7147,8 +7147,8 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
option("animated backgrounds");
option("screen effects");
option("text outline");
option("invincibility");
option("slowdown");
option("invincibility", !ingame_titlemode || !inspecial());
option("slowdown", !ingame_titlemode || !inspecial());
option("load screen");
option("room name bg");
option("return");

View file

@ -493,6 +493,8 @@ void menuactionpress()
break;
case 3:
//invincibility
if (!game.ingame_titlemode || !game.inspecial())
{
if (!map.invincibility)
{
game.createmenu(Menu::setinvincibility);
@ -503,12 +505,26 @@ void menuactionpress()
map.invincibility = !map.invincibility;
}
music.playef(11);
}
else
{
music.playef(2);
map.invincibility = false;
}
break;
case 4:
//change game speed
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