| 1161 | } |
| 1162 | |
| 1163 | void Cvar_UnsetUserCreated_f(void) |
| 1164 | { |
| 1165 | cvar_t *curvar = cvar_vars; |
| 1166 | uint32_t count = 0; |
| 1167 | |
| 1168 | while ( curvar ) |
| 1169 | { |
| 1170 | if ( ( curvar->flags & CVAR_USER_CREATED ) ) |
| 1171 | { |
| 1172 | // throw out any variables the user created |
| 1173 | curvar = Cvar_Unset( curvar ); |
| 1174 | count++; |
| 1175 | continue; |
| 1176 | } |
| 1177 | curvar = curvar->next; |
| 1178 | } |
| 1179 | |
| 1180 | if ( count > 0 ) |
| 1181 | Com_Printf( S_COLOR_GREY "Removed " S_COLOR_WHITE "%u" S_COLOR_GREY " user created cvars" S_COLOR_WHITE "\n", count ); |
| 1182 | else |
| 1183 | Com_Printf( S_COLOR_GREY "No user created cvars to remove" S_COLOR_WHITE "\n" ); |
| 1184 | } |
| 1185 | |
| 1186 | /* |
| 1187 | ============ |
nothing calls this directly
no test coverage detected