- took the delayed console command execution out of the thinker management.
Doing this intermingled with the thinkers is highly unsafe because there are absolutely no guarantees about order of execution. Effectively it ran these commands right in the middle of the playsim which could cause all sorts of synchronization issues, because CCMDs are part of the UI, not the playsim. - pass a const string to AddCommandString. This function manipulated the input buffer, leading to all sorts of code contortions to make sure that the passed parameter is clean for that. This function will now create a copy of the passed parameter which it can manipulate without complicating its calling code. # Conflicts: # src/c_dispatch.cpp
This commit is contained in:
parent
2f84de9c37
commit
39f53a4de0
7 changed files with 121 additions and 132 deletions
|
|
@ -2579,7 +2579,7 @@ void D_DoomMain (void)
|
|||
// [RH] Run any saved commands from the command line or autoexec.cfg now.
|
||||
gamestate = GS_FULLCONSOLE;
|
||||
Net_NewMakeTic ();
|
||||
DThinker::RunThinkers ();
|
||||
C_RunDelayedCommands();
|
||||
gamestate = GS_STARTUP;
|
||||
|
||||
if (!restart)
|
||||
|
|
@ -2646,7 +2646,7 @@ void D_DoomMain (void)
|
|||
G_InitNew(startmap, false);
|
||||
if (StoredWarp.IsNotEmpty())
|
||||
{
|
||||
AddCommandString(StoredWarp.LockBuffer());
|
||||
AddCommandString(StoredWarp);
|
||||
StoredWarp = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue