From a5770191bba498b220fe3bf5d9e8b03b3ae2bea8 Mon Sep 17 00:00:00 2001 From: Arbab Ahmed Date: Sat, 30 Jul 2022 15:56:50 +1000 Subject: [PATCH] use FLT_MAX instead of 1e+30, remove a busted two lines of code --- sp/src/game/server/particle_system.cpp | 13 ++++--------- sp/src/game/server/props.cpp | 2 +- 2 files changed, 5 insertions(+), 10 deletions(-) diff --git a/sp/src/game/server/particle_system.cpp b/sp/src/game/server/particle_system.cpp index 85ce3c10..a8f576a7 100644 --- a/sp/src/game/server/particle_system.cpp +++ b/sp/src/game/server/particle_system.cpp @@ -265,15 +265,10 @@ void CParticleSystem::ReadControlPointEnts(void) { 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])); - - } - + // 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) diff --git a/sp/src/game/server/props.cpp b/sp/src/game/server/props.cpp index e53582d5..ad5cc84f 100644 --- a/sp/src/game/server/props.cpp +++ b/sp/src/game/server/props.cpp @@ -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