1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2025-01-08 18:09:45 +01:00

Fix inconsistencies with y-positions of spawns

It seems like the start point of a custom level and all checkpoints in
the game end up putting your spawn point one pixel away from the surface
it touches, which seems like an oversight. I'm going to enforce some
consistency here and make it so that all spawn points, whenever you
start from a start point or a checkpoint, will always be correctly
positioned flush with the surface they're standing on, and not one pixel
more or less than that.
This commit is contained in:
Misa 2020-10-05 23:13:07 -07:00 committed by Ethan Lee
parent dfdad165f5
commit 7b7c7b2dc7
2 changed files with 6 additions and 5 deletions

View file

@ -2619,12 +2619,12 @@ bool entityclass::updateentities( int i )
if (entities[i].tile == 20)
{
game.savey = entities[i].yp - 1;
game.savey = entities[i].yp - 2;
game.savegc = 1;
}
else if (entities[i].tile == 21)
{
game.savey = entities[i].yp-8;
game.savey = entities[i].yp - 7;
game.savegc = 0;
}

View file

@ -1526,7 +1526,7 @@ void editorclass::findstartpoint()
game.edsaverx = 100+tx;
game.edsavery = 100+ty;
game.edsavegc = 0;
game.edsavey--;
game.edsavey++;
game.edsavedir=1-edentity[testeditor].p1;
}
}
@ -4719,12 +4719,13 @@ void editorinput()
if (edentity[testeditor].p1 == 0) // NOT a bool check!
{
game.edsavegc = 1;
game.edsavey -= 2;
}
else
{
game.edsavegc = 0;
game.edsavey -= 7;
}
game.edsavey--;
game.edsavedir = 0;
}
else
@ -4737,7 +4738,7 @@ void editorinput()
game.edsaverx = 100+tx;
game.edsavery = 100+ty;
game.edsavegc = 0;
game.edsavey--;
game.edsavey++;
game.edsavedir=1-edentity[testeditor].p1;
}