3 Years Ago
Replace per tool GameData with a shared one managed by IToolFramework2, move the managed GameData out of Tools.MapEditor and into Tools, same with it's interop. * Decoupled CGameData from CGameConfig (mapdoclib), removed g_pGameData use the IToolFramework2 locator now instead. * Initialize managed GameData from CToolFramework2::Init() before anything could ever need it. * Populate GameData from managed asynchronously, this solves race conditions of loading Hammer too fast, as well as letting you add localaddons mid game. Tool scenes loading maps will now have access to all this managed game data too, solving lighting issues / missing sky boxes in modeldoc / others. This also gives us a very easy route to deprecate fgd files in ModelDoc if desired. Instead of loading GameData from addons on initialize, load it in from assemblies when added to GameAssemblyManager Unfuck the map compilation, gotta use a dirty global for gamedata still in mapdoclib, set it automatically when toolframework2 is avaliable, mapcompiler manages it's own manually though. A couple of dirty hacks to do this, we can undo these if we end up making map compilation not use a seperate process - or there may be some nicer ways to do these globals.