use FLT_MAX instead of 1e+30, remove a busted two lines of code

This commit is contained in:
Arbab Ahmed 2022-07-30 15:56:50 +10:00
parent fa3d686067
commit a5770191bb
2 changed files with 5 additions and 10 deletions

View File

@ -265,15 +265,10 @@ void CParticleSystem::ReadControlPointEnts(void)
{ {
if (UsesCoordinates()) { if (UsesCoordinates()) {
float vecCoords[3]; float vecCoords[3];
if (UsesCoordinates()) { // cast str to vector, add vector to array
float vecCoords[3]; const char* pszVector = STRING(m_iszControlPointNames[i]);
// cast str to vector, add vector to array UTIL_StringToVector(vecCoords, pszVector);
const char* pszVector = STRING(m_iszControlPointNames[i]); m_vControlPointVecs.Set(i, Vector(vecCoords[0], vecCoords[1], vecCoords[2]));
UTIL_StringToVector(vecCoords, pszVector);
m_vControlPointVecs.Set(i, Vector(vecCoords[0], vecCoords[1], vecCoords[2]));
}
} }
else{ else{
if (m_iszControlPointNames[i] == NULL_STRING) if (m_iszControlPointNames[i] == NULL_STRING)

View File

@ -2854,7 +2854,7 @@ void CInteractableProp::Use(CBaseEntity *pActivator, CBaseEntity *pCaller, USE_T
} }
if (m_flCooldown == -1 && !m_bLocked){ if (m_flCooldown == -1 && !m_bLocked){
m_flCooldownTime = 1e+30; // yeah we're not going to hit this any time soon m_flCooldownTime = FLT_MAX; // yeah we're not going to hit this any time soon
} }
else if (m_flCooldown == -1){ else if (m_flCooldown == -1){
m_flCooldownTime = gpGlobals->curtime + 1.0f; // 1s cooldown if locked m_flCooldownTime = gpGlobals->curtime + 1.0f; // 1s cooldown if locked