2015-06-30 15:46:07 +06:00
|
|
|
#include "precompiled.h"
|
|
|
|
|
|
|
|
skilldata_t gSkillData;
|
|
|
|
|
2015-08-20 16:35:01 +06:00
|
|
|
// take the name of a cvar, tack a digit for the skill level
|
2015-09-17 02:19:21 +06:00
|
|
|
// on, and return the value.of that Cvar
|
2015-06-30 15:46:07 +06:00
|
|
|
NOXREF float GetSkillCvar(char *pName)
|
|
|
|
{
|
2015-08-20 16:35:01 +06:00
|
|
|
int iCount;
|
2015-06-30 15:46:07 +06:00
|
|
|
float flValue;
|
|
|
|
char szBuffer[64];
|
|
|
|
|
2024-09-13 06:43:27 +07:00
|
|
|
iCount = Q_snprintf(szBuffer, sizeof(szBuffer), "%s%d", pName, gSkillData.iSkillLevel);
|
2015-06-30 15:46:07 +06:00
|
|
|
flValue = CVAR_GET_FLOAT(szBuffer);
|
|
|
|
|
|
|
|
if (flValue <= 0.0f)
|
2015-08-20 16:35:01 +06:00
|
|
|
{
|
2017-11-01 22:01:24 +07:00
|
|
|
ALERT(at_console, "\n\n** GetSkillCVar Got a zero for %s **\n\n", szBuffer);
|
2015-08-20 16:35:01 +06:00
|
|
|
}
|
2015-06-30 15:46:07 +06:00
|
|
|
|
|
|
|
return flValue;
|
|
|
|
}
|