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("animated backgrounds");
option("screen effects"); option("screen effects");
option("text outline"); option("text outline");
option("invincibility"); option("invincibility", !ingame_titlemode || !inspecial());
option("slowdown"); option("slowdown", !ingame_titlemode || !inspecial());
option("load screen"); option("load screen");
option("room name bg"); option("room name bg");
option("return"); option("return");

View file

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