1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-22 17:49:43 +01:00

Fix spawning from an exotic checkpoint setting invalid gravitycontrol

An exotic checkpoint is a checkpoint with a sprite that is neither the
flipped checkpoint nor unflipped checkpoint. More specifically, it's a
checkpoint whose edentity p1 attribute is something other than 0 or 1.

Normally, whenever you touch an exotic checkpoint in-game, your
savepoint's y-position and gravitycontrol don't get touched. However, in
the editor, spawning from an exotic checkpoint means that your
gravitycontrol gets set to a value that is neither 0 nor 1. In this
invalid gravitycontrol state, Viridian is treated like they're flipped,
but they cannot unflip.

This is an inconsistency between the editor and in-game, so I'm fixing
it. Now, spawning from an exotic checkpoint in the editor will just set
your gravitycontrol to 0, i.e. unflipped.
This commit is contained in:
Misa 2020-10-05 23:04:58 -07:00 committed by Ethan Lee
parent b4a0acc01d
commit dfdad165f5

View file

@ -4716,7 +4716,14 @@ void editorinput()
game.edsavey = (edentity[testeditor].y%30)*8;
game.edsaverx = 100+tx;
game.edsavery = 100+ty;
game.edsavegc = 1-edentity[testeditor].p1;
if (edentity[testeditor].p1 == 0) // NOT a bool check!
{
game.edsavegc = 1;
}
else
{
game.edsavegc = 0;
}
game.edsavey--;
game.edsavedir = 0;
}