Disable more flashing elements if a11y is on

For some reason, the accessibility option that was meant to disable
flashes doesn't disable ALL flashes, only screen flashes and screen
shaking. This commit disables a lot more, most importantly randomness
in colors, the player flashing on death/respawn, and teleporters
flashing.
This commit is contained in:
AllyTally
2023-04-05 20:45:40 -03:00
committed by Misa Elizabeth Kai
parent 73aee381ad
commit c6ebf5aeda
6 changed files with 73 additions and 56 deletions

View File

@@ -3738,7 +3738,7 @@ void entityclass::animateentities( int _i )
}
break;
case 100: //the teleporter!
if (entities[_i].tile == 1)
if (entities[_i].tile == 1 || game.noflashingmode)
{
//it's inactive
entities[_i].drawframe = entities[_i].tile;
@@ -3748,10 +3748,10 @@ void entityclass::animateentities( int _i )
entities[_i].drawframe = entities[_i].tile;
entities[_i].framedelay--;
if(entities[_i].framedelay<=0)
if (entities[_i].framedelay <= 0)
{
entities[_i].framedelay = 1;
entities[_i].walkingframe = int(fRandom() * 6);
entities[_i].walkingframe = (int) (fRandom() * 6);
if (entities[_i].walkingframe >= 4)
{
entities[_i].walkingframe = -1;
@@ -3768,10 +3768,10 @@ void entityclass::animateentities( int _i )
entities[_i].drawframe = entities[_i].tile;
entities[_i].framedelay--;
if(entities[_i].framedelay<=0)
if (entities[_i].framedelay <= 0)
{
entities[_i].framedelay = 2;
entities[_i].walkingframe = int(fRandom() * 6);
entities[_i].walkingframe = (int) (fRandom() * 6);
if (entities[_i].walkingframe >= 4)
{
entities[_i].walkingframe = -5;