MCPcopy Create free account
hub / github.com/JACoders/OpenJK / Script_Delay

Function Script_Delay

code/ui/ui_shared.cpp:2511–2528  ·  view source on GitHub ↗

================= Script_Delay Delays the rest of the script for the specified amount of time ================= */

Source from the content-addressed store, hash-verified

2509=================
2510*/
2511qboolean Script_Delay ( itemDef_t* item, const char **args )
2512{
2513 int time;
2514
2515 if (Int_Parse(args, &time))
2516 {
2517 item->window.flags |= WINDOW_SCRIPTWAITING;
2518 item->window.delayTime = DC->realTime + time; // Flag to set delay time on next paint
2519 item->window.delayedScript = (char *)*args; // Copy current location, we'll resume executing here later
2520 }
2521 else
2522 {
2523 Com_Printf(S_COLOR_YELLOW"WARNING: Script_Delay: error parsing\n" );
2524 }
2525
2526 // Stop running
2527 return qfalse;
2528}
2529
2530/*
2531=================

Callers

nothing calls this directly

Calls 2

Int_ParseFunction · 0.70
Com_PrintfFunction · 0.50

Tested by

no test coverage detected