Jump to content

XComGameState_GameTime & TDateTime question


TheRealSFlo

Recommended Posts

Obviously the class is there to return data about how much in-game time has passed and whatnot, but it uses some kind of object or type named TDateTime that I can't find the definition for.

 

So yeah. What exactly is TDateTime supposed to be? How does calculating time in XCOM 2 actually work?

 

I'm also a bit fuzzy on what the precise differences in the time variables used in Firaxis's code are (.m_iYear is pretty straightforward, but .m_fTime is vague), although I'm pretty sure I can suss it if I had access to wherever the definition was.

 

Sorry in advance if this turns out to be a dumb question.

Link to comment
Share on other sites

Well, X2StrategyGameRulesetDatastructures.uc has this:

struct native TDateTime
{
	var float   m_fTime;
	var int 	m_iDay;
	var int 	m_iMonth;
	var int 	m_iYear;
};

it also has various static functions to manipulate time. There is also XcomGameState_GameTime.uc. I suspect this is where time is being stored during game play, but I am not sure.

Link to comment
Share on other sites

The XComGameState_GameTime is needed so that the time gets "checked in" to the History so it can be serialized into the savefile.

 

Otherwise, most of the helpers for manipulating time are in X2StrategyGameRulesetDataStructures.uc, as CaveRat pointed out.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...