mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-29 17:38:16 +03:00
Split glitchrunner mode into multiple versions
Previously, turning glitchrunner mode on essentially locked you to emulating 2.0, and turning it off just meant normal 2.3 behavior. But what if you wanted 2.2 behavior instead? Well, that's what I had to ask when a TAS of mine would desync in 2.3 because of the two-frame delay fix (glitchrunner off), but would also desync because of 2.0 warp lines (glitchrunner on). What I've done is made it so there are three states to glitchrunner mode now: 2.0 (previously just the "on" state), 2.2 (previously a state you couldn't use), and "off". Furthermore, I made it an enum, so in case future versions of the game patch out more glitches, we can add them to the enum (and the only other thing we have to update is a lookup table in GlitchrunnerMode.c). Also, 2.2 glitches exist in 2.0, so you'll want to use GlitchrunnerMode_less_than_or_equal() to check glitchrunner version.
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
|
||||
#include "editor.h"
|
||||
#include "Game.h"
|
||||
#include "GlitchrunnerMode.h"
|
||||
#include "Graphics.h"
|
||||
#include "Map.h"
|
||||
#include "Music.h"
|
||||
@@ -4844,7 +4845,7 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
|
||||
}
|
||||
break;
|
||||
case 7: // Person versus horizontal warp line, pre-2.1
|
||||
if (game.glitchrunnermode
|
||||
if (GlitchrunnerMode_less_than_or_equal(Glitchrunner2_0)
|
||||
&& game.deathseq == -1
|
||||
&& entities[j].onentity > 0
|
||||
&& entityhlinecollide(i, j))
|
||||
|
||||
Reference in New Issue
Block a user