================= Script_Delay Delays the rest of the script for the specified amount of time ================= */
| 2509 | ================= |
| 2510 | */ |
| 2511 | qboolean 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 | ================= |
nothing calls this directly
no test coverage detected