mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-22 17:49:43 +01:00
Correct onground/onroof check
This commit is contained in:
parent
72ade2ce49
commit
d64608ecaa
1 changed files with 2 additions and 2 deletions
|
@ -2260,7 +2260,7 @@ void gameinput(void)
|
||||||
game.gravitycontrol = 1;
|
game.gravitycontrol = 1;
|
||||||
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
|
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
|
||||||
{
|
{
|
||||||
if (obj.entities[ie].rule == 0 && obj.entities[ie].onground)
|
if (obj.entities[ie].rule == 0 && (obj.entities[ie].onground > 0 || obj.entities[ie].onroof > 0))
|
||||||
{
|
{
|
||||||
obj.entities[ie].vy = -4;
|
obj.entities[ie].vy = -4;
|
||||||
obj.entities[ie].ay = -3;
|
obj.entities[ie].ay = -3;
|
||||||
|
@ -2275,7 +2275,7 @@ void gameinput(void)
|
||||||
game.gravitycontrol = 0;
|
game.gravitycontrol = 0;
|
||||||
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
|
for (size_t ie = 0; ie < obj.entities.size(); ++ie)
|
||||||
{
|
{
|
||||||
if (obj.entities[ie].rule == 0 && obj.entities[ie].onroof)
|
if (obj.entities[ie].rule == 0 && (obj.entities[ie].onground > 0 || obj.entities[ie].onroof > 0))
|
||||||
{
|
{
|
||||||
obj.entities[ie].vy = 4;
|
obj.entities[ie].vy = 4;
|
||||||
obj.entities[ie].ay = 3;
|
obj.entities[ie].ay = 3;
|
||||||
|
|
Loading…
Reference in a new issue