Please consider adding support for global/static variables that doesn't involve such an expensive lookup, preferably with some way to initialize them at startup (without the overhead of using an event handler for this purpose).
Alternatively, you might add “singleton objects”: a declaration of an object that has its own type, has exactly one global instance at all times, and is constructed and initialized at startup. Example of this idea:
Code: Select all
object MyGlobalVariables
{
int testVar;
{
testVar = 42;
Console.Printf("MyGlobalVariables.testVar was initialized to %d.", testVar);
}
}
class MyActorClass : Actor
{
states
{
Spawn:
TNT1 A 0 nodelay A_SomeAction(MyGlobalVariables.testVar);
…
}
}