mirror of
https://github.com/TerryCavanagh/VVVVVV.git
synced 2026-01-31 02:14:09 +03:00
Turn crew rescued/mood vectors into arrays
Since they're always fixed-size, they don't need to be dynamically-sized vectors. entityclass::customcrewmoods is now a proper bool instead of an int now, and I replaced the hardcoded constant 6 with a static const int Game attribute to make it easier to change.
This commit is contained in:
@@ -1366,8 +1366,8 @@ void scriptclass::run()
|
||||
}
|
||||
else if (words[0] == "ifcrewlost")
|
||||
{
|
||||
int crewmate = ss_toi(words[1]);
|
||||
if (crewmate >= 0 && crewmate < (int) game.crewstats.size() && game.crewstats[crewmate]==false)
|
||||
size_t crewmate = ss_toi(words[1]);
|
||||
if (crewmate < SDL_arraysize(game.crewstats) && game.crewstats[crewmate]==false)
|
||||
{
|
||||
load(words[2]);
|
||||
position--;
|
||||
@@ -3570,7 +3570,7 @@ void scriptclass::hardreset()
|
||||
game.nodeathmode = false;
|
||||
game.nocutscenes = false;
|
||||
|
||||
for (i = 0; i < 6; i++)
|
||||
for (i = 0; i < (int) SDL_arraysize(game.crewstats); i++)
|
||||
{
|
||||
game.crewstats[i] = false;
|
||||
}
|
||||
@@ -3704,8 +3704,8 @@ void scriptclass::hardreset()
|
||||
obj.flags.clear();
|
||||
obj.flags.resize(100);
|
||||
|
||||
for (i = 0; i < 6; i++){
|
||||
obj.customcrewmoods[i]=1;
|
||||
for (i = 0; i < (int) SDL_arraysize(obj.customcrewmoods); i++){
|
||||
obj.customcrewmoods[i]=true;
|
||||
}
|
||||
|
||||
obj.collect.clear();
|
||||
|
||||
Reference in New Issue
Block a user