================= Com_AddStartupCommands Adds command line parameters as script statements Commands are seperated by + signs Returns qtrue if any late commands were added, which will keep the demoloop from immediately starting ================= */
| 447 | ================= |
| 448 | */ |
| 449 | qboolean Com_AddStartupCommands( void ) { |
| 450 | int i; |
| 451 | qboolean added; |
| 452 | |
| 453 | added = qfalse; |
| 454 | // quote every token, so args with semicolons can work |
| 455 | for (i=0 ; i < com_numConsoleLines ; i++) { |
| 456 | if ( !com_consoleLines[i] || !com_consoleLines[i][0] ) { |
| 457 | continue; |
| 458 | } |
| 459 | |
| 460 | // set commands won't override menu startup |
| 461 | if ( Q_stricmpn( com_consoleLines[i], "set", 3 ) ) { |
| 462 | added = qtrue; |
| 463 | } |
| 464 | Cbuf_AddText( com_consoleLines[i] ); |
| 465 | Cbuf_AddText( "\n" ); |
| 466 | } |
| 467 | |
| 468 | return added; |
| 469 | } |
| 470 | |
| 471 | |
| 472 | //============================================================================ |
no test coverage detected