whoward69
DLL Minion
Does anybody know why Firaxis always get a local copy of the script system, ie
and not just make pkScriptSystem global to the class?
It rather implies that the instance of the script system is either not re-usable/re-entrant or is somehow unique to the context the object is being called from - both of which I find hard to believe (at least in a single player / hot-seat game environment - ie the one we can write DLL mods for)
I'm wondering if it's not just (another example of) "copy-and-paste what was done before without thought" style programming
Code:
ICvEngineScriptSystem1* pkScriptSystem = gDLL->GetScriptSystem();
if(pkScriptSystem)
{
...
}
and not just make pkScriptSystem global to the class?
It rather implies that the instance of the script system is either not re-usable/re-entrant or is somehow unique to the context the object is being called from - both of which I find hard to believe (at least in a single player / hot-seat game environment - ie the one we can write DLL mods for)
I'm wondering if it's not just (another example of) "copy-and-paste what was done before without thought" style programming