mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Maintain game.swnmode until all gravitron squares are offscreen
Today, I saw a video posted by Chelito on the VVVVVV speedrunning Discord where he died inside a gravitron square over and over after the Gravitron in Intermission 2 ended. https://cdn.discordapp.com/attachments/234787368522088448/779074864660480020/What.mp4 This is caused by the fact that after the Gravitron ends, the game no longer considers you to be inside swnmode, so it won't move the enemies offscreen when you die. To fix this, after the Gravitron ends, the game will switch to swngame 8, where it will keep you inside swnmode until all gravitron squares are offscreen. This means that gravitron squares that are onscreen after the Gravitron ends will be moved offscreen if you die, preventing the above death loop from happening.
This commit is contained in:
parent
db0c38711c
commit
634a41d80d
1 changed files with 17 additions and 2 deletions
|
@ -788,8 +788,7 @@ void gamelogic()
|
|||
if (obj.entities[line].xp > 320)
|
||||
{
|
||||
obj.removeentity(line);
|
||||
game.swnmode = false;
|
||||
game.swngame = 6;
|
||||
game.swngame = 8;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -810,6 +809,22 @@ void gamelogic()
|
|||
game.swncoldelay = 30;
|
||||
}
|
||||
}
|
||||
else if (game.swngame == 8) //extra kludge if player dies after game a ends
|
||||
{
|
||||
bool square_onscreen = false;
|
||||
for (size_t i = 0; i < obj.entities.size(); i++)
|
||||
{
|
||||
if (obj.entities[i].type == 23)
|
||||
{
|
||||
square_onscreen = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!square_onscreen)
|
||||
{
|
||||
game.swnmode = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Time trial stuff
|
||||
|
|
Loading…
Reference in a new issue