mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-12-26 20:31:30 +00:00
Don't count down wait timer when executing a command
This commit is contained in:
parent
6d95f3ceb2
commit
36e678b292
3 changed files with 18 additions and 7 deletions
|
@ -148,6 +148,20 @@ void COM_BufInsertText(const char *ptext)
|
|||
}
|
||||
}
|
||||
|
||||
/** Progress the wait timer and flush waiting console commands when ready.
|
||||
*/
|
||||
void
|
||||
COM_BufTicker(void)
|
||||
{
|
||||
if (com_wait)
|
||||
{
|
||||
com_wait--;
|
||||
return;
|
||||
}
|
||||
|
||||
COM_BufExecute();
|
||||
}
|
||||
|
||||
/** Flushes (executes) console commands in the buffer.
|
||||
*/
|
||||
void COM_BufExecute(void)
|
||||
|
@ -157,12 +171,6 @@ void COM_BufExecute(void)
|
|||
char line[1024] = "";
|
||||
INT32 quotes;
|
||||
|
||||
if (com_wait)
|
||||
{
|
||||
com_wait--;
|
||||
return;
|
||||
}
|
||||
|
||||
while (com_text.cursize)
|
||||
{
|
||||
// find a '\n' or; line break
|
||||
|
|
|
@ -45,6 +45,9 @@ void COM_ImmedExecute(const char *ptext);
|
|||
// Execute commands in buffer, flush them
|
||||
void COM_BufExecute(void);
|
||||
|
||||
// As above; and progress the wait timer.
|
||||
void COM_BufTicker(void);
|
||||
|
||||
// setup command buffer, at game tartup
|
||||
void COM_Init(void);
|
||||
|
||||
|
|
|
@ -4563,7 +4563,7 @@ void TryRunTics(tic_t realtics)
|
|||
|
||||
if (realtics >= 1)
|
||||
{
|
||||
COM_BufExecute();
|
||||
COM_BufTicker();
|
||||
if (mapchangepending)
|
||||
D_MapChange(-1, 0, ultimatemode, false, 2, false, fromlevelselect); // finish the map change
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue