1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-11 03:19:46 +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,6 +493,8 @@ void menuactionpress()
break; break;
case 3: case 3:
//invincibility //invincibility
if (!game.ingame_titlemode || !game.inspecial())
{
if (!map.invincibility) if (!map.invincibility)
{ {
game.createmenu(Menu::setinvincibility); game.createmenu(Menu::setinvincibility);
@ -503,12 +505,26 @@ void menuactionpress()
map.invincibility = !map.invincibility; map.invincibility = !map.invincibility;
} }
music.playef(11); music.playef(11);
}
else
{
music.playef(2);
map.invincibility = false;
}
break; break;
case 4: case 4:
//change game speed //change game speed
if (!game.inspecial())
{
game.createmenu(Menu::setslowdown); game.createmenu(Menu::setslowdown);
map.nexttowercolour(); map.nexttowercolour();
music.playef(11); music.playef(11);
}
else
{
music.playef(2);
game.gameframerate = 34;
}
break; break;
case 5: case 5:
// toggle fake load screen // toggle fake load screen