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

Only apply flip momentum to player entities on ground/roof

This commit is contained in:
leo60228 2021-09-02 14:47:12 -04:00 committed by Misa Elizabeth Kai
parent e30fc4500e
commit 58098dc748

View file

@ -2258,7 +2258,7 @@ void gameinput(void)
game.gravitycontrol = 1;
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
{
if (obj.entities[ie].rule == 0)
if (obj.entities[ie].rule == 0 && obj.entities[ie].onground)
{
obj.entities[ie].vy = -4;
obj.entities[ie].ay = -3;
@ -2273,7 +2273,7 @@ void gameinput(void)
game.gravitycontrol = 0;
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
{
if (obj.entities[ie].rule == 0)
if (obj.entities[ie].rule == 0 && obj.entities[ie].onroof)
{
obj.entities[ie].vy = 4;
obj.entities[ie].ay = 3;