1
0
Fork 0
mirror of https://github.com/TerryCavanagh/VVVVVV.git synced 2024-12-23 10:09:43 +01:00

Fix sprite of player if they are stuck in a wall

If the player is stuck in a wall (which shouldn't happen in the first
place), their sprite would always default to being flipped, even if they
were unflipped.

Being stuck in a wall is characterized by having both positive onfloor
and onground.
This commit is contained in:
Misa 2020-09-05 16:55:34 -07:00 committed by Ethan Lee
parent 6658a46b2e
commit 9de3aba94b

View file

@ -3326,6 +3326,12 @@ void entityclass::animateentities( int _i )
} }
if (entities[_i].onroof > 0) entities[_i].drawframe += 6; if (entities[_i].onroof > 0) entities[_i].drawframe += 6;
// Stuck in a wall? Then default to gravitycontrol
if (entities[_i].onground > 0 && entities[_i].onroof > 0
&& game.gravitycontrol == 0)
{
entities[_i].drawframe -= 6;
}
} }
else else
{ {