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

Merge pull request #588 from InfoTeddy/general-bug-fixes

Fix tile of disappearing platforms during final stretch
This commit is contained in:
Terry Cavanagh 2021-04-02 17:51:30 +10:30 committed by GitHub
commit 4ebbfe476a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 19 deletions

View file

@ -2506,7 +2506,7 @@ bool entityclass::updateentities( int i )
else if (entities[i].state == 2)
{
entities[i].life--;
if (entities[i].life % 3 == 0) entities[i].tile++;
if (entities[i].life % 3 == 0) entities[i].walkingframe++;
if (entities[i].life <= 0)
{
disableblockat(entities[i].xp, entities[i].yp);
@ -2524,19 +2524,19 @@ bool entityclass::updateentities( int i )
createblock(0, entities[i].xp, entities[i].yp, 32, 8);
entities[i].state = 4;
entities[i].invis = false;
entities[i].tile--;
entities[i].walkingframe--;
entities[i].state++;
entities[i].onentity = 1;
}
else if (entities[i].state == 5)
{
entities[i].life+=3;
if (entities[i].life % 3 == 0) entities[i].tile--;
if (entities[i].life % 3 == 0) entities[i].walkingframe--;
if (entities[i].life >= 12)
{
entities[i].life = 12;
entities[i].state = 0;
entities[i].tile++;
entities[i].walkingframe++;
}
}
break;
@ -3593,6 +3593,9 @@ void entityclass::animateentities( int _i )
break;
}
break;
case 2: //Disappearing platforms
entities[_i].drawframe = entities[_i].tile + entities[_i].walkingframe;
break;
case 11:
entities[_i].drawframe = entities[_i].tile;
if(entities[_i].animate==2)

View file

@ -418,21 +418,6 @@ void gamelogic(void)
}
if (!entitygone) obj.entities[i].state = 4;
}
else if (map.finalstretch && obj.entities[i].type == 2)
{
//for the final level. probably something 99% of players won't see.
bool entitygone = false;
while (obj.entities[i].state == 2)
{
entitygone = obj.updateentities(i);
if (entitygone)
{
i--;
break;
}
}
if (!entitygone) obj.entities[i].state = 4;
}
else if (obj.entities[i].type == 23 && game.swnmode && game.deathseq<15)
{
//if playing SWN, get the enemies offscreen.