Don't use separate variable for number of crewmates in level

Same as previous commit, this time for crewmates.
This commit is contained in:
Misa
2020-04-08 22:13:43 -07:00
committed by Ethan Lee
parent 0047dc8d81
commit 89b6b67a77
4 changed files with 33 additions and 28 deletions

View File

@@ -2011,17 +2011,17 @@ void Game::updatestate()
graphics.addline("You have found a lost crewmate!");
graphics.textboxcenterx();
if(ed.numcrewmates-crewmates()==0)
if(ed.numcrewmates()-crewmates()==0)
{
graphics.createtextbox(" All crewmates rescued! ", 50, 65, 174, 174, 174);
}
else if(ed.numcrewmates-crewmates()==1)
else if(ed.numcrewmates()-crewmates()==1)
{
graphics.createtextbox(" " + help.number(ed.numcrewmates-crewmates())+ " remains ", 50, 65, 174, 174, 174);
graphics.createtextbox(" " + help.number(ed.numcrewmates()-crewmates())+ " remains ", 50, 65, 174, 174, 174);
}
else
{
graphics.createtextbox(" " + help.number(ed.numcrewmates-crewmates())+ " remain ", 50, 65, 174, 174, 174);
graphics.createtextbox(" " + help.number(ed.numcrewmates()-crewmates())+ " remain ", 50, 65, 174, 174, 174);
}
graphics.textboxcenterx();
@@ -2033,17 +2033,17 @@ void Game::updatestate()
graphics.addline("You have found a lost crewmate!");
graphics.textboxcenterx();
if(ed.numcrewmates-crewmates()==0)
if(ed.numcrewmates()-crewmates()==0)
{
graphics.createtextbox(" All crewmates rescued! ", 50, 135, 174, 174, 174);
}
else if(ed.numcrewmates-crewmates()==1)
else if(ed.numcrewmates()-crewmates()==1)
{
graphics.createtextbox(" " + help.number(ed.numcrewmates-crewmates())+ " remains ", 50, 135, 174, 174, 174);
graphics.createtextbox(" " + help.number(ed.numcrewmates()-crewmates())+ " remains ", 50, 135, 174, 174, 174);
}
else
{
graphics.createtextbox(" " + help.number(ed.numcrewmates-crewmates())+ " remain ", 50, 135, 174, 174, 174);
graphics.createtextbox(" " + help.number(ed.numcrewmates()-crewmates())+ " remain ", 50, 135, 174, 174, 174);
}
graphics.textboxcenterx();
}
@@ -2055,7 +2055,7 @@ void Game::updatestate()
completestop = false;
state = 0;
if(ed.numcrewmates-crewmates()==0)
if(ed.numcrewmates()-crewmates()==0)
{
if(map.custommodeforreal)
{
@@ -2092,7 +2092,7 @@ void Game::updatestate()
map.tdrawback = true;
#if !defined(NO_CUSTOM_LEVELS)
//Update level stats
if(ed.numcrewmates-crewmates()==0)
if(ed.numcrewmates()-crewmates()==0)
{
//Finished level
if(ed.numtrinkets()-trinkets()==0)