mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2024-12-23 01:59:43 +01:00
Refactor: Unindent horizontal line code
This removes unnecessary indentation in the code responsible for acting on a horizontal gravity line collision. The "meat" of the code is now no longer pushed to the right, as it should be.
This commit is contained in:
parent
0edf0016d9
commit
265d4f9dc4
1 changed files with 23 additions and 21 deletions
|
@ -4852,12 +4852,16 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
|
|||
}
|
||||
break;
|
||||
case 4: //Person vs horizontal line!
|
||||
if(game.deathseq==-1)
|
||||
{
|
||||
if (entities[j].onentity > 0)
|
||||
{
|
||||
if (entityhlinecollide(i, j))
|
||||
const bool collision =
|
||||
game.deathseq == -1
|
||||
&& entities[j].onentity > 0
|
||||
&& entityhlinecollide(i, j);
|
||||
if (!collision)
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
||||
music.playef(Sound_GRAVITYLINE);
|
||||
game.gravitycontrol = (game.gravitycontrol + 1) % 2;
|
||||
game.totalflips++;
|
||||
|
@ -4872,10 +4876,8 @@ void entityclass::collisioncheck(int i, int j, bool scm /*= false*/)
|
|||
|
||||
entities[j].state = entities[j].onentity;
|
||||
entities[j].life = 6;
|
||||
}
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
case 5: //Person vs vertical gravity/warp line!
|
||||
if(game.deathseq==-1)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue