OpenXcom Forum

Contributions => Programming => Topic started by: Stoddard on August 28, 2016, 11:06:01 pm

Title: Code question
Post by: Stoddard on August 28, 2016, 11:06:01 pm
Can someone please explain what are the

Code: [Select]
if (_game->getSavedGame()->getMonthsPassed() != -1)
checks all around the codebase mean?

Title: Re: Code question
Post by: Meridian on August 28, 2016, 11:19:20 pm
That's a check if you are in a "New Battle" mode or in a real game.
(...I think, I don't have access to source code at the moment, will check tomorrow.)
Title: Re: Code question
Post by: Warboy1982 on August 28, 2016, 11:26:19 pm
That's a check if you are in a "New Battle" mode or in a real game.

that's correct, although i think in one specific circumstance it means "on commencement of a new game" (ie: setting up missions for january)
Title: Re: Code question
Post by: Stoddard on August 29, 2016, 12:38:51 am
Ah, well, didn't expect that.
Thank you all for the answer.