mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Move Secret Lab nocompetitive check to Super Gravitron
It turns out, despite the game attempting to prevent you from using invincibility or slowdown in the Super Gravitron by simply preventing you from entering the Secret Lab from the menu, it's still possible to enter the Super Gravitron with it anyways. Just have invincibility or slowdown (or both!) enabled, enter the game normally, and talk to Victoria when you have 20 trinkets, to start the epilogue cutscene. Yeah, that's a pretty big gaping hole right there... It's also possible to do a trick that speedrunners use called telejumping to the Secret Lab to bypass the invincibility/slowdown check, too. So rather than single-case patch both of these, I'm going to fix it as generally as possible, by moving the invincibility/slowdown check to the gamestate that starts the Super Gravitron, gamestate 9. If you have invincibility/slowdown enabled, you immediately get sent back to the Secret Lab. However, this check is ignored in custom levels, because custom levels may want to use the Super Gravitron and let players have invincibility/slowdown while doing so (and there are in fact custom levels out in the wild that use the Super Gravitron; it was like one of the first things done when people discovered internal scripting). No message pops up when the game sends you back to the Secret Lab, but no message popped up when the Secret Lab menu option was disabled previously in the first place, so I haven't made anything WORSE, per se. A nice effect of this is that you can have invincibility/slowdown enabled and still be able to go to the Secret Lab from the menu. This is useful if you just want to check your trophies and leave, without having to go out of your way to disable invincibility/slowdown just to go inside.
This commit is contained in:
parent
b3c2f56c79
commit
4e0484553d
2 changed files with 17 additions and 9 deletions
|
@ -791,6 +791,13 @@ void Game::updatestate(void)
|
|||
break;
|
||||
|
||||
case 9:
|
||||
if (!map.custommode && nocompetitive())
|
||||
{
|
||||
returntolab();
|
||||
state = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
//Start SWN Minigame Mode B
|
||||
obj.removetrigger(9);
|
||||
|
||||
|
@ -6251,7 +6258,7 @@ void Game::createmenu( enum Menu::MenuName t, bool samemenu/*= false*/ )
|
|||
//ok, secret lab! no notification, but test:
|
||||
if (unlock[8])
|
||||
{
|
||||
option("secret lab", !nocompetitive());
|
||||
option("secret lab");
|
||||
}
|
||||
option("play modes");
|
||||
if (save_exists())
|
||||
|
@ -6808,7 +6815,13 @@ int Game::get_timestep(void)
|
|||
|
||||
bool Game::incompetitive(void)
|
||||
{
|
||||
return insecretlab || intimetrial || nodeathmode;
|
||||
return (
|
||||
!map.custommode
|
||||
&& swnmode
|
||||
&& (swngame == 1 || swngame == 6 || swngame == 7)
|
||||
)
|
||||
|| intimetrial
|
||||
|| nodeathmode;
|
||||
}
|
||||
|
||||
bool Game::nocompetitive(void)
|
||||
|
|
|
@ -1252,13 +1252,8 @@ static void menuactionpress(void)
|
|||
}
|
||||
else if (game.currentmenuoption == 1 && game.unlock[8])
|
||||
{
|
||||
if(!game.nocompetitive()){
|
||||
music.playef(11);
|
||||
startmode(11);
|
||||
}else{
|
||||
//Can't do yet! play sad sound
|
||||
music.playef(2);
|
||||
}
|
||||
}
|
||||
else if (game.currentmenuoption == sloffset+2)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue