Author Topic: Code question  (Read 3490 times)

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Code question
« 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?


Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 8597
    • View Profile
Re: Code question
« Reply #1 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.)

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: Code question
« Reply #2 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)
« Last Edit: August 29, 2016, 11:50:54 am by Warboy1982 »

Offline Stoddard

  • Colonel
  • ****
  • Posts: 485
  • in a fey mood
    • View Profile
    • Linux builds & stuff
Re: Code question
« Reply #3 on: August 29, 2016, 12:38:51 am »
Ah, well, didn't expect that.
Thank you all for the answer.