mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Glitchless: Fix warp token death warps
The warp token death warp glitch is simple. It takes advantage of the fact that, in the main game, warp tokens (barring some exceptions) only change the room but do not change the player's position. So if the player dies while touching a warp token, the room will change but they will stay at the same position of their respawn point, which is used in speedrunning. To fix this, if the player dies, make sure that the warp tokens in the room don't warp them. Otherwise, this would still be possible to do even without pressing R.
This commit is contained in:
parent
b8ab77c701
commit
3f222d3f74
1 changed files with 14 additions and 0 deletions
|
@ -854,6 +854,20 @@ void mapclass::resetplayer(const bool player_died)
|
|||
game.scmprogress = game.roomx - 40;
|
||||
}
|
||||
}
|
||||
|
||||
if (game.glitchlessmode)
|
||||
{
|
||||
/* Fix warp token death warps:
|
||||
* Reset the state of all warp tokens to 0. */
|
||||
for (size_t i = 0; i < obj.entities.size(); i++)
|
||||
{
|
||||
entclass* entity = &obj.entities[i];
|
||||
if (entity->type == 11)
|
||||
{
|
||||
entity->state = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void mapclass::warpto(int rx, int ry , int t, int tx, int ty)
|
||||
|
|
Loading…
Reference in a new issue