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

Gravity token changes

This commit is contained in:
AllyTally 2022-11-07 01:25:53 -04:00
parent 5d2e477f06
commit b6d1cf480c
2 changed files with 27 additions and 6 deletions

View file

@ -1480,13 +1480,14 @@ void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int
entity.rule = 3; entity.rule = 3;
entity.type = 4; entity.type = 4;
entity.size = 0; entity.size = 0;
entity.tile = 11; entity.tile = 68 + meta1;
entity.colour = meta2;
entity.w = 16; entity.w = 16;
entity.h = 16; entity.h = 16;
entity.behave = meta1; entity.behave = p2;
entity.para = meta2; entity.para = p3;
entity.onentity = 1; entity.onentity = 1;
entity.animate = 100; entity.animate = (p1 >= 1) ? 1 : -1;
break; break;
case 6: //Decorative particles case 6: //Decorative particles
entity.rule = 2; entity.rule = 2;
@ -2634,8 +2635,22 @@ bool entityclass::updateentities( int i )
{ {
game.gravitycontrol = (game.gravitycontrol + 1) % 2; game.gravitycontrol = (game.gravitycontrol + 1) % 2;
++game.totalflips; ++game.totalflips;
return disableentity(i); music.playef(8 + entities[i].behave);
entities[i].invis = true;
entities[i].state = 2;
// Removes collision
entities[i].onentity = 0;
}
else if (entities[i].state == 2)
{
// Wait until recharged!
}
else if (entities[i].state == 3)
{
// Respawn!
entities[i].invis = false;
entities[i].state = 0;
entities[i].onentity = 1;
} }
break; break;
case 5: //Particle sprays case 5: //Particle sprays
@ -3475,6 +3490,7 @@ void entityclass::animateentities( int _i )
} }
break; break;
case 1: case 1:
case 4:
case 23: case 23:
//Variable animation //Variable animation
switch(entities[_i].animate) switch(entities[_i].animate)

View file

@ -417,6 +417,11 @@ void gamelogic(void)
} }
if (!entitygone) obj.entities[i].state = 4; if (!entitygone) obj.entities[i].state = 4;
} }
else if (obj.entities[i].type == 4 && obj.entities[i].state == 2)
{
// Flip token: Give a signal to respawn
obj.entities[i].state = 3;
}
else if (obj.entities[i].type == 23 && game.swnmode && game.deathseq<15) else if (obj.entities[i].type == 23 && game.swnmode && game.deathseq<15)
{ {
//if playing SWN, get the enemies offscreen. //if playing SWN, get the enemies offscreen.