|
|
@ -2367,13 +2367,13 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ |
|
|
|
m_flMaxFrame = (float)MODEL_FRAMES( pev->modelindex ) - 1; |
|
|
|
m_flMaxFrame = (float)MODEL_FRAMES( pev->modelindex ) - 1; |
|
|
|
|
|
|
|
|
|
|
|
pev->rendercolor = Vector( r, g, b ); |
|
|
|
pev->rendercolor = Vector( r, g, b ); |
|
|
|
pev->scale = 1.2; |
|
|
|
pev->scale = 1.2f; |
|
|
|
pev->frame = 0; |
|
|
|
pev->frame = 0; |
|
|
|
|
|
|
|
|
|
|
|
if( m_pSprite ) |
|
|
|
if( m_pSprite ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_pSprite->SetTransparency( kRenderGlow, r, g, b, 255, kRenderFxNoDissipation ); |
|
|
|
m_pSprite->SetTransparency( kRenderGlow, r, g, b, 255, kRenderFxNoDissipation ); |
|
|
|
m_pSprite->pev->scale = 1.0; |
|
|
|
m_pSprite->pev->scale = 1.0f; |
|
|
|
m_pSprite->TurnOn(); |
|
|
|
m_pSprite->TurnOn(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -2384,7 +2384,7 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ |
|
|
|
if( m_pBeams ) |
|
|
|
if( m_pBeams ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
UTIL_SetOrigin( m_pBeams->pev, pev->origin ); |
|
|
|
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->SetColor( 0, 255, 0 ); |
|
|
|
m_pBeams->m_noiseAmplitude = 65; |
|
|
|
m_pBeams->m_noiseAmplitude = 65; |
|
|
|
m_pBeams->m_life = 0.5; |
|
|
|
m_pBeams->m_life = 0.5; |
|
|
@ -2400,11 +2400,11 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ |
|
|
|
m_pBeams->Spawn(); |
|
|
|
m_pBeams->Spawn(); |
|
|
|
m_pBeams->pev->solid = SOLID_NOT; |
|
|
|
m_pBeams->pev->solid = SOLID_NOT; |
|
|
|
m_pBeams->SetThink( &CLightning::StrikeThink ); |
|
|
|
m_pBeams->SetThink( &CLightning::StrikeThink ); |
|
|
|
m_pBeams->pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
m_pBeams->pev->nextthink = gpGlobals->time + 0.1f; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SetThink( &CWarpBall::BallThink ); |
|
|
|
SetThink( &CWarpBall::BallThink ); |
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
pev->nextthink = gpGlobals->time + 0.1f; |
|
|
|
|
|
|
|
|
|
|
|
m_flLastTime = gpGlobals->time; |
|
|
|
m_flLastTime = gpGlobals->time; |
|
|
|
// m_fBeamsCleared = FALSE;
|
|
|
|
// m_fBeamsCleared = FALSE;
|
|
|
@ -2412,7 +2412,7 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ |
|
|
|
|
|
|
|
|
|
|
|
if( !m_flDamageDelay ) |
|
|
|
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; |
|
|
|
m_fDamageApplied = TRUE; |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
@ -2420,8 +2420,8 @@ void CWarpBall::WarpBallUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_ |
|
|
|
m_fDamageApplied = FALSE; |
|
|
|
m_fDamageApplied = FALSE; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
SUB_UseTargets( this, USE_TOGGLE, 0.0 ); |
|
|
|
SUB_UseTargets( this, USE_TOGGLE, 0.0f ); |
|
|
|
UTIL_ScreenShake( pev->origin, 4.0, 100.0, 2.0, 1000.0 ); |
|
|
|
UTIL_ScreenShake( pev->origin, 4.0f, 100.0f, 2.0f, 1000.0f ); |
|
|
|
m_flWarpStart = gpGlobals->time; |
|
|
|
m_flWarpStart = gpGlobals->time; |
|
|
|
EMIT_SOUND_DYN( ENT( pev ), CHAN_WEAPON, "debris/alien_teleport.wav", 1.0, ATTN_NORM, 0, PITCH_NORM ); |
|
|
|
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( m_pBeams ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if( pev->frame >= m_flMaxFrame - 4.0 ) |
|
|
|
if( pev->frame >= m_flMaxFrame - 4.0f ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
m_pBeams->SetThink( NULL ); |
|
|
|
m_pBeams->SetThink( NULL ); |
|
|
|
m_pBeams->pev->nextthink = gpGlobals->time; |
|
|
|
m_pBeams->pev->nextthink = gpGlobals->time; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
pev->nextthink = gpGlobals->time + 0.1; |
|
|
|
pev->nextthink = gpGlobals->time + 0.1f; |
|
|
|
m_flLastTime = gpGlobals->time; |
|
|
|
m_flLastTime = gpGlobals->time; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|