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

@ -263,17 +263,12 @@ void CParticleSystem::ReadControlPointEnts(void)
{
for (int i = 0; i < kMAXCONTROLPOINTS; ++i)
{
if (UsesCoordinates()) {
float vecCoords[3];
if (UsesCoordinates()) {
float vecCoords[3];
// cast str to vector, add vector to array
const char* pszVector = STRING(m_iszControlPointNames[i]);
UTIL_StringToVector(vecCoords, pszVector);
m_vControlPointVecs.Set(i, Vector(vecCoords[0], vecCoords[1], vecCoords[2]));
}
}
else{
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){
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){
m_flCooldownTime = gpGlobals->curtime + 1.0f; // 1s cooldown if locked