============ Cvar_SetCheatState Any testing variables will be reset to the safe values ============ */
| 760 | ============ |
| 761 | */ |
| 762 | void Cvar_SetCheatState( void ) { |
| 763 | cvar_t *var; |
| 764 | |
| 765 | // set all default vars to the safe value |
| 766 | for ( var = cvar_vars ; var ; var = var->next ) { |
| 767 | if ( var->flags & CVAR_CHEAT ) { |
| 768 | // the CVAR_LATCHED|CVAR_CHEAT vars might escape the reset here |
| 769 | // because of a different var->latchedString |
| 770 | if (var->latchedString) |
| 771 | { |
| 772 | Cvar_FreeString(var->latchedString); |
| 773 | var->latchedString = NULL; |
| 774 | } |
| 775 | if (strcmp(var->resetString,var->string)) { |
| 776 | Cvar_Set( var->name, var->resetString ); |
| 777 | } |
| 778 | } |
| 779 | } |
| 780 | } |
| 781 | |
| 782 | /* |
| 783 | ============ |
no test coverage detected