small fix hopefully to error being spammed
This commit is contained in:
parent
68a6b389b0
commit
91bb936ebb
@ -51,6 +51,8 @@ public int Native_Isspecialmap(Handle handler, int numParams)
|
|||||||
public int GetCurrentStage()
|
public int GetCurrentStage()
|
||||||
{
|
{
|
||||||
int iLevelCounterEnt = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Counter", "math_counter");
|
int iLevelCounterEnt = FindEntityByTargetname(INVALID_ENT_REFERENCE, "Level_Counter", "math_counter");
|
||||||
|
if (iLevelCounterEnt == -1)
|
||||||
|
return 0;
|
||||||
int offset = FindDataMapInfo(iLevelCounterEnt, "m_OutValue");
|
int offset = FindDataMapInfo(iLevelCounterEnt, "m_OutValue");
|
||||||
int iCounterVal = RoundFloat(GetEntDataFloat(iLevelCounterEnt, offset));
|
int iCounterVal = RoundFloat(GetEntDataFloat(iLevelCounterEnt, offset));
|
||||||
return iCounterVal;
|
return iCounterVal;
|
||||||
|
Loading…
Reference in New Issue
Block a user