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