- reworked CVARs to not use a linked list and to be initialized manually.
This solves two problems: * The linked list is too slow, a map is better. A map cannot be used with statically allocated CVARs because order of initialization is undefined. * The current CVAR system is an unordered mishmash of static variables and dynamically allocated ones and the means of identification are unsafe. With this everything is allocated on the heap so it can all be handled the same by the cleanup code.
This commit is contained in:
parent
ef887403cf
commit
453688ccc6
28 changed files with 369 additions and 203 deletions
|
|
@ -38,7 +38,6 @@
|
|||
#include "d_main.h"
|
||||
|
||||
EXTERN_CVAR (Bool, ticker);
|
||||
EXTERN_CVAR (Bool, noisedebug);
|
||||
EXTERN_CVAR (Int, am_cheat);
|
||||
EXTERN_CVAR (Int, cl_blockcheats);
|
||||
|
||||
|
|
@ -525,7 +524,6 @@ static bool Cht_Ticker (cheatseq_t *cheat)
|
|||
|
||||
static bool Cht_Sound (cheatseq_t *cheat)
|
||||
{
|
||||
noisedebug = !noisedebug;
|
||||
Printf ("%s\n", GStrings(noisedebug ? "TXT_CHEATSOUNDON" : "TXT_CHEATSOUNDOFF"));
|
||||
AddCommandString("stat sounddebug");
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue