Exemple #1
0
static bool R_CvarPostProcess (cvar_t *cvar)
{
	if (r_config.frameBufferObject && r_config.drawBuffers)
		return Cvar_AssertValue(cvar, 0, 1, true);

	Cvar_SetValue(cvar->name, 0);
	return true;
}
Exemple #2
0
static bool R_CvarPrograms (cvar_t *cvar)
{
	if (qglUseProgram) {
		return Cvar_AssertValue(cvar, 0, 3, true);
	}

	Cvar_SetValue(cvar->name, 0);
	return true;
}
Exemple #3
0
static bool R_CvarCheckDynamicLights (cvar_t *cvar)
{
	float maxLights = r_config.maxLights;

	if (maxLights > MAX_ENTITY_LIGHTS)
		maxLights = MAX_ENTITY_LIGHTS;

	return Cvar_AssertValue(cvar, 0, maxLights, true);
}
Exemple #4
0
static bool R_CvarCheckMaxLightmap (cvar_t *cvar)
{
	if (r_config.maxTextureSize && cvar->integer > r_config.maxTextureSize) {
		Com_Printf("%s exceeded max supported texture size\n", cvar->name);
		Cvar_SetValue(cvar->name, r_config.maxTextureSize);
		return false;
	}

	if (!Q_IsPowerOfTwo(cvar->integer)) {
		Com_Printf("%s must be power of two\n", cvar->name);
		Cvar_SetValue(cvar->name, LIGHTMAP_BLOCK_WIDTH);
		return false;
	}

	return Cvar_AssertValue(cvar, 128, LIGHTMAP_BLOCK_WIDTH, true);
}
Exemple #5
0
/**
 * @brief Watches that the cvar cl_maxfps is never getting lower than 10
 */
static bool Com_CvarCheckMaxFPS (cvar_t* cvar)
{
	/* don't allow setting maxfps too low (or game could stop responding) */
	return Cvar_AssertValue(cvar, 10, 1000, true);
}
Exemple #6
0
static bool SV_CheckMaxSoldiersPerPlayer (cvar_t* cvar)
{
	const int max = MAX_ACTIVETEAM;
	return Cvar_AssertValue(cvar, 1, max, true);
}
Exemple #7
0
static bool CL_CvarCheckVidMode (cvar_t* cvar)
{
	return Cvar_AssertValue(cvar, -1, VID_GetModeNums(), true);
}
Exemple #8
0
static bool CL_CvarCheckVidGamma (cvar_t* cvar)
{
	return Cvar_AssertValue(cvar, 0.1, 3.0, false);
}