Portable Half-Life SDK. GoldSource and Xash3D. Crossplatform.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

44 lines
1.3 KiB

9 years ago
/***
*
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
*
* This product contains software technology licensed from Id
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
* All Rights Reserved.
*
* Use, distribution, and modification of this source code and/or resulting
* object code is restricted to non-commercial enhancements to products from
* Valve LLC. All other use, distribution, or modification is prohibited
* without written permission from Valve LLC.
*
****/
//=========================================================
// skill.cpp - code for skill level concerns
//=========================================================
#include "extdll.h"
#include "util.h"
#include "skill.h"
8 years ago
skilldata_t gSkillData;
9 years ago
//=========================================================
// take the name of a cvar, tack a digit for the skill level
// on, and return the value.of that Cvar
//=========================================================
float GetSkillCvar( const char *pName )
9 years ago
{
8 years ago
float flValue;
char szBuffer[64];
sprintf( szBuffer, "%s%d",pName, gSkillData.iSkillLevel );
9 years ago
8 years ago
flValue = CVAR_GET_FLOAT( szBuffer );
9 years ago
8 years ago
if( flValue <= 0 )
9 years ago
{
8 years ago
ALERT( at_console, "\n\n** GetSkillCVar Got a zero for %s **\n\n", szBuffer );
9 years ago
}
return flValue;
}