mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49: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:
parent
6658a46b2e
commit
9de3aba94b
1 changed files with 6 additions and 0 deletions
|
@ -3326,6 +3326,12 @@ void entityclass::animateentities( int _i )
|
|||
}
|
||||
|
||||
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
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue