small fix hopefully to error being spammed

This commit is contained in:
jenzur 2020-06-26 12:30:19 +02:00
parent 68a6b389b0
commit 91bb936ebb

View File

@ -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;