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 authored and Ethan Lee committed 2020-10-06 02:24:51 -04:00
1 parent dfdad165f5
commit 7b7c7b2dc7
2 files changed
+6 -5

No files matched your search

+2 -2
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;
}
+4 -3
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;
}