From ac3a4c663f4bf8f1bab965b1cdf554395a2fd7a8 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sun, 1 Dec 2019 14:40:26 +0500 Subject: [PATCH 1/2] Remove trailing spaces. --- dlls/effects.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/dlls/effects.cpp b/dlls/effects.cpp index dceb6140..fc61cf7e 100644 --- a/dlls/effects.cpp +++ b/dlls/effects.cpp @@ -2286,9 +2286,9 @@ LINK_ENTITY_TO_CLASS( env_warpball, CWarpBall ) TYPEDESCRIPTION CWarpBall::m_SaveData[] = { - // DEFINE_FIELD( CWarpBall, m_iBeams, FIELD_INTEGER ), - DEFINE_FIELD( CWarpBall, m_flLastTime, FIELD_FLOAT ), - DEFINE_FIELD( CWarpBall, m_flMaxFrame, FIELD_FLOAT ), + // DEFINE_FIELD( CWarpBall, m_iBeams, FIELD_INTEGER ), + DEFINE_FIELD( CWarpBall, m_flLastTime, FIELD_FLOAT ), + DEFINE_FIELD( CWarpBall, m_flMaxFrame, FIELD_FLOAT ), DEFINE_FIELD( CWarpBall, m_flBeamRadius, FIELD_FLOAT ), DEFINE_FIELD( CWarpBall, m_iszWarpTarget, FIELD_STRING ), DEFINE_FIELD( CWarpBall, m_flWarpStart, FIELD_FLOAT ), @@ -2469,10 +2469,10 @@ void CWarpBall::BallThink( void ) CWarpBall *CWarpBall::CreateWarpBall( const Vector &p_VecOrigin ) { - // Create a new entity with CWarpball private data - CWarpBall *pWarpBall = GetClassPtr( (CWarpBall *)NULL ); - pWarpBall->pev->classname = MAKE_STRING( "env_warpball" ); + // Create a new entity with CWarpball private data + CWarpBall *pWarpBall = GetClassPtr( (CWarpBall *)NULL ); + pWarpBall->pev->classname = MAKE_STRING( "env_warpball" ); UTIL_SetOrigin( pWarpBall->pev, p_VecOrigin ); - return pWarpBall; + return pWarpBall; } From c7fe134222c45575391ebac095d153c4e2bbbbc7 Mon Sep 17 00:00:00 2001 From: Andrey Akhmichin Date: Sun, 1 Dec 2019 14:44:19 +0500 Subject: [PATCH 2/2] Double promotion fixes. --- dlls/effects.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/effects.cpp b/dlls/effects.cpp index fc61cf7e..171d4ed4 100644 --- a/dlls/effects.cpp +++ b/dlls/effects.cpp @@ -2367,13 +2367,13 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ m_flMaxFrame = (float)MODEL_FRAMES( pev->modelindex ) - 1; pev->rendercolor = Vector( r, g, b ); - pev->scale = 1.2; + pev->scale = 1.2f; pev->frame = 0; if( m_pSprite ) { m_pSprite->SetTransparency( kRenderGlow, r, g, b, 255, kRenderFxNoDissipation ); - m_pSprite->pev->scale = 1.0; + m_pSprite->pev->scale = 1.0f; m_pSprite->TurnOn(); } @@ -2384,7 +2384,7 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ if( m_pBeams ) { UTIL_SetOrigin( m_pBeams->pev, pev->origin ); - m_pBeams->m_restrike = -0.5; + m_pBeams->m_restrike = -0.5f; m_pBeams->SetColor( 0, 255, 0 ); m_pBeams->m_noiseAmplitude = 65; m_pBeams->m_life = 0.5; @@ -2400,11 +2400,11 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ m_pBeams->Spawn(); m_pBeams->pev->solid = SOLID_NOT; m_pBeams->SetThink( &CLightning::StrikeThink ); - m_pBeams->pev->nextthink = gpGlobals->time + 0.1; + m_pBeams->pev->nextthink = gpGlobals->time + 0.1f; } SetThink( &CWarpBall::BallThink ); - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_flLastTime = gpGlobals->time; // m_fBeamsCleared = FALSE; @@ -2412,7 +2412,7 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ if( !m_flDamageDelay ) { - RadiusDamage( pev->origin, pev, pev, 300.0, 48.0, CLASS_NONE, DMG_SHOCK ); + RadiusDamage( pev->origin, pev, pev, 300.0f, 48.0f, CLASS_NONE, DMG_SHOCK ); m_fDamageApplied = TRUE; } else @@ -2420,8 +2420,8 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ m_fDamageApplied = FALSE; } - SUB_UseTargets( this, USE_TOGGLE, 0.0 ); - UTIL_ScreenShake( pev->origin, 4.0, 100.0, 2.0, 1000.0 ); + SUB_UseTargets( this, USE_TOGGLE, 0.0f ); + UTIL_ScreenShake( pev->origin, 4.0f, 100.0f, 2.0f, 1000.0f ); m_flWarpStart = gpGlobals->time; EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, "debris/alien_teleport.wav", 1.0, ATTN_NORM, 0, PITCH_NORM ); } @@ -2455,14 +2455,14 @@ void CWarpBall::BallThink( void ) if( m_pBeams ) { - if( pev->frame >= m_flMaxFrame - 4.0 ) + if( pev->frame >= m_flMaxFrame - 4.0f ) { m_pBeams->SetThink( NULL ); m_pBeams->pev->nextthink = gpGlobals->time; } } - pev->nextthink = gpGlobals->time + 0.1; + pev->nextthink = gpGlobals->time + 0.1f; m_flLastTime = gpGlobals->time; } }