TheRealSFlo Posted March 9, 2016 Share Posted March 9, 2016 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 More sharing options...
CaveRat Posted March 9, 2016 Share Posted March 9, 2016 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 More sharing options...
TheRealSFlo Posted March 9, 2016 Author Share Posted March 9, 2016 How..... How did I miss that? I'll just crawl back into my corner.... Link to comment Share on other sites More sharing options...
Amineri Posted March 9, 2016 Share Posted March 9, 2016 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 More sharing options...
Recommended Posts