Skip to content

Commit

Permalink
flip token changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AllyTally committed Jan 18, 2023
1 parent 172e3a8 commit 62f2990
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 6 deletions.
28 changes: 22 additions & 6 deletions desktop_version/src/Entity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1477,13 +1477,14 @@ void entityclass::createentity(int xp, int yp, int t, int meta1, int meta2, int
entity.rule = 3;
entity.type = 4;
entity.size = 0;
entity.tile = 11;
entity.tile = 68 + meta1;
entity.colour = meta2;
entity.w = 16;
entity.h = 16;
entity.behave = meta1;
entity.para = meta2;
entity.behave = p2;
entity.para = p3;
entity.onentity = 1;
entity.animate = 100;
entity.animate = (p1 >= 1) ? 1 : -1;
break;
case 6: //Decorative particles
entity.rule = 2;
Expand Down Expand Up @@ -2631,8 +2632,22 @@ bool entityclass::updateentities( int i )
{
game.gravitycontrol = (game.gravitycontrol + 1) % 2;
++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;
case 5: //Particle sprays
Expand Down Expand Up @@ -3472,6 +3487,7 @@ void entityclass::animateentities( int _i )
}
break;
case 1:
case 4:
case 23:
//Variable animation
switch(entities[_i].animate)
Expand Down
5 changes: 5 additions & 0 deletions desktop_version/src/Logic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ void gamelogic(void)
}
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)
{
//if playing SWN, get the enemies offscreen.
Expand Down

0 comments on commit 62f2990

Please sign in to comment.