mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-11-04 18:29:41 +01:00
Restore pre-2.1 warp bypass glitch in glitchrunner mode
So, I was staring at VVVVVV code one day, as I usually do, and I noticed that warp lines had this curious code in entityclass::updateentities() that set their statedelay to 2, and I thought, hm, maybe the pre-2.1 warp line bypass is caused by this statedelay. And, it doesn't seem like this is the primary code used to detect if the player collides with warp lines, the actual code is commented with "Rewritten system for mobile update" and bolted-on in gamelogic() instead of properly being in entityclass::entitycollisioncheck(). So, after getting tripped up on the misleading indentation of that "Rewritten system" block, I removed the rewritten system, re-added collision detection for rule 7 (horizontal warp lines), and after checking the resulting behavior, it appears to be nearly identical to that of warp lines in 2.0. You see, if you use warp lines to flip up from the top of the screen onto the bottom of the screen, close to the edge of the bottom of the screen, Viridian's head will display on the top of the screen in 2.0. In 2.1 and later, this doesn't happen, confirming that my theory is correct. I also performed warp line bypass multiple times in 2.0 and with my restored code, and it is pretty much the exact same behavior. So now, the pre-2.1 warp line bypass glitch has been re-enabled in glitchrunner mode.
This commit is contained in:
parent
23434f0842
commit
1d40bbdbc7
2 changed files with 22 additions and 10 deletions
|
@ -4728,7 +4728,7 @@ void entityclass::entitycollisioncheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (entities[j].rule == 5) //Player vs vertical line!
|
if (entities[j].rule == 5) //Player vs vertical gravity/warp line!
|
||||||
{
|
{
|
||||||
if(game.deathseq==-1)
|
if(game.deathseq==-1)
|
||||||
{
|
{
|
||||||
|
@ -4758,6 +4758,16 @@ void entityclass::entitycollisioncheck()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (entities[j].rule == 7) // Player versus horizontal warp line, pre-2.1
|
||||||
|
{
|
||||||
|
if (game.glitchrunnermode
|
||||||
|
&& game.deathseq == -1
|
||||||
|
&& entities[j].onentity > 0
|
||||||
|
&& entityhlinecollide(i, j))
|
||||||
|
{
|
||||||
|
entities[j].state = entities[j].onentity;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1022,16 +1022,18 @@ void gamelogic()
|
||||||
|
|
||||||
//Using warplines?
|
//Using warplines?
|
||||||
if (obj.customwarpmode) {
|
if (obj.customwarpmode) {
|
||||||
//Rewritten system for mobile update: basically, the new logic is to
|
if (!game.glitchrunnermode) {
|
||||||
//check if the player is leaving the map, and if so do a special check against
|
//Rewritten system for mobile update: basically, the new logic is to
|
||||||
//warp lines for collision
|
//check if the player is leaving the map, and if so do a special check against
|
||||||
obj.customwarpmodehon = false;
|
//warp lines for collision
|
||||||
obj.customwarpmodevon = false;
|
obj.customwarpmodehon = false;
|
||||||
|
obj.customwarpmodevon = false;
|
||||||
|
|
||||||
int i = obj.getplayer();
|
int i = obj.getplayer();
|
||||||
if (i > -1 && ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || (game.door_up > -2 && obj.entities[i].yp < -2+16) || (game.door_left > -2 && obj.entities[i].xp < -14+16) || (game.door_right > -2 && obj.entities[i].xp >= 308-16))){
|
if (i > -1 && ((game.door_down > -2 && obj.entities[i].yp >= 226-16) || (game.door_up > -2 && obj.entities[i].yp < -2+16) || (game.door_left > -2 && obj.entities[i].xp < -14+16) || (game.door_right > -2 && obj.entities[i].xp >= 308-16))){
|
||||||
//Player is leaving room
|
//Player is leaving room
|
||||||
obj.customwarplinecheck(i);
|
obj.customwarplinecheck(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(obj.customwarpmodehon){ map.warpy=true;
|
if(obj.customwarpmodehon){ map.warpy=true;
|
||||||
|
|
Loading…
Reference in a new issue