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

Remove remnants of entity 'active' conditionals

In the previous commit, if an if-statement consisted solely of checking
the active attribute of an entity, I temporarily changed it to 'true'
and put a comment to remove it later, because it would add too much
noise to unindent everything in the same commit.
This commit is contained in:
Misa 2020-04-03 13:57:02 -07:00 committed by Ethan Lee
parent b1b1474b7b
commit fd417d6a8c
2 changed files with 1595 additions and 1615 deletions

View file

@ -194,15 +194,12 @@ void entityclass::swnenemiescol( int t )
{ {
//change the colour of all SWN enemies to the current one //change the colour of all SWN enemies to the current one
for (size_t i = 0; i < entities.size(); i++) for (size_t i = 0; i < entities.size(); i++)
{
if (true) // FIXME: remove this later (no more 'active')
{ {
if (entities[i].type == 23) if (entities[i].type == 23)
{ {
entities[i].colour = swncolour(t); entities[i].colour = swncolour(t);
} }
} }
}
} }
void entityclass::gravcreate( int ypos, int dir, int xoff /*= 0*/, int yoff /*= 0*/ ) void entityclass::gravcreate( int ypos, int dir, int xoff /*= 0*/, int yoff /*= 0*/ )
@ -2233,8 +2230,6 @@ void entityclass::createentity( float xp, float yp, int t, float vx /*= 0*/, flo
bool entityclass::updateentities( int i ) bool entityclass::updateentities( int i )
{ {
if(true) // FIXME: remove this later (no more 'active')
{
if(entities[i].statedelay<=0) if(entities[i].statedelay<=0)
{ {
switch(entities[i].type) switch(entities[i].type)
@ -3393,15 +3388,12 @@ bool entityclass::updateentities( int i )
entities[i].statedelay = 0; entities[i].statedelay = 0;
} }
} }
}
return true; return true;
} }
void entityclass::animateentities( int _i ) void entityclass::animateentities( int _i )
{ {
if(true) // FIXME: remove this later (no more 'active')
{
if(entities[_i].statedelay < 1) if(entities[_i].statedelay < 1)
{ {
switch(entities[_i].type) switch(entities[_i].type)
@ -3759,7 +3751,6 @@ void entityclass::animateentities( int _i )
//entities[_i].statedelay--; //entities[_i].statedelay--;
if (entities[_i].statedelay < 0) entities[_i].statedelay = 0; if (entities[_i].statedelay < 0) entities[_i].statedelay = 0;
} }
}
} }
bool entityclass::gettype( int t ) bool entityclass::gettype( int t )
@ -4182,8 +4173,6 @@ float entityclass::hplatformat()
{ {
//Returns first entity of horizontal platform at (px, py), -1000 otherwise. //Returns first entity of horizontal platform at (px, py), -1000 otherwise.
for (size_t i = 0; i < entities.size(); i++) for (size_t i = 0; i < entities.size(); i++)
{
if (true) // FIXME: remove this later (no more 'active')
{ {
if (entities[i].rule == 2) if (entities[i].rule == 2)
{ {
@ -4207,7 +4196,6 @@ float entityclass::hplatformat()
} }
} }
} }
}
return -1000; return -1000;
} }
@ -4657,7 +4645,6 @@ void entityclass::customwarplinecheck(int i) {
//Turns on obj.customwarpmodevon and obj.customwarpmodehon if player collides //Turns on obj.customwarpmodevon and obj.customwarpmodehon if player collides
//with warp lines //with warp lines
if (true) { // FIXME: remove this later (no more 'active')
//We test entity to entity //We test entity to entity
for (int j = 0; j < (int) entities.size(); j++) { for (int j = 0; j < (int) entities.size(); j++) {
if (i != j) {//Active if (i != j) {//Active
@ -4678,14 +4665,11 @@ void entityclass::customwarplinecheck(int i) {
} }
} }
} }
}
} }
void entityclass::entitycollisioncheck() void entityclass::entitycollisioncheck()
{ {
for (size_t i = 0; i < entities.size(); i++) for (size_t i = 0; i < entities.size(); i++)
{
if (true) // FIXME: remove this later (no more 'active')
{ {
//We test entity to entity //We test entity to entity
for (size_t j = 0; j < entities.size(); j++) for (size_t j = 0; j < entities.size(); j++)
@ -4877,7 +4861,6 @@ void entityclass::entitycollisioncheck()
} }
} }
} }
}
//can't have the player being stuck... //can't have the player being stuck...
int j = getplayer(); int j = getplayer();

View file

@ -1825,8 +1825,6 @@ void mapclass::loadlevel(int rx, int ry)
} }
for (size_t i = 0; i < obj.entities.size(); i++) for (size_t i = 0; i < obj.entities.size(); i++)
{
if (true) //FIXME: remove this later (no more 'active')
{ {
if (obj.entities[i].type == 1 && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10) if (obj.entities[i].type == 1 && obj.entities[i].behave >= 8 && obj.entities[i].behave < 10)
{ {
@ -1847,7 +1845,6 @@ void mapclass::loadlevel(int rx, int ry)
} }
} }
} }
}
//Special scripting: Create objects and triggers based on what crewmembers are rescued. //Special scripting: Create objects and triggers based on what crewmembers are rescued.
if (!finalmode) if (!finalmode)