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

Function Cvar_UnsetUserCreated_f

code/qcommon/cvar.cpp:1163–1184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1161}
1162
1163void 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============

Callers

nothing calls this directly

Calls 2

Cvar_UnsetFunction · 0.70
Com_PrintfFunction · 0.70

Tested by

no test coverage detected