- give thinkers a 'level' member and change linking to the chain to happen outside the constructor.

This commit is contained in:
Christoph Oelckers 2019-01-27 01:49:20 +01:00
commit 8323524014
43 changed files with 201 additions and 228 deletions

View file

@ -54,6 +54,7 @@
#include "serializer.h"
#include "menu/menu.h"
#include "vm.h"
#include "g_levellocals.h"
// MACROS ------------------------------------------------------------------
@ -656,7 +657,7 @@ void C_DoCommand (const char *cmd, int keynum)
}
else
{
Create<DStoredCommand> (com, beg);
currentUILevel->CreateThinker<DStoredCommand> (com, beg);
}
}
}
@ -752,7 +753,7 @@ void AddCommandString (char *cmd, int keynum)
// Note that deferred commands lose track of which key
// (if any) they were pressed from.
*brkpt = ';';
Create<DWaitingCommand> (brkpt, tics, UnsafeExecutionContext);
currentUILevel->CreateThinker<DWaitingCommand> (brkpt, tics, UnsafeExecutionContext);
}
return;
}