|
|
@ -209,9 +209,9 @@ void CRpgRocket::FlyThink( void ) |
|
|
|
|
|
|
|
|
|
|
|
// this acceleration and turning math is totally wrong, but it seems to respond well so don't change it.
|
|
|
|
// this acceleration and turning math is totally wrong, but it seems to respond well so don't change it.
|
|
|
|
float flSpeed = pev->velocity.Length(); |
|
|
|
float flSpeed = pev->velocity.Length(); |
|
|
|
if( gpGlobals->time - m_flIgniteTime < 1.0 ) |
|
|
|
if( gpGlobals->time - m_flIgniteTime < 1.0f ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pev->velocity = pev->velocity * 0.2 + vecTarget * ( flSpeed * 0.8 + 400 ); |
|
|
|
pev->velocity = pev->velocity * 0.2f + vecTarget * ( flSpeed * 0.8f + 400.0f ); |
|
|
|
if( pev->waterlevel == 3 ) |
|
|
|
if( pev->waterlevel == 3 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
// go slow underwater
|
|
|
|
// go slow underwater
|
|
|
@ -219,7 +219,7 @@ void CRpgRocket::FlyThink( void ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
pev->velocity = pev->velocity.Normalize() * 300; |
|
|
|
pev->velocity = pev->velocity.Normalize() * 300; |
|
|
|
} |
|
|
|
} |
|
|
|
UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1, pev->origin, 4 ); |
|
|
|
UTIL_BubbleTrail( pev->origin - pev->velocity * 0.1f, pev->origin, 4 ); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
@ -236,7 +236,7 @@ void CRpgRocket::FlyThink( void ) |
|
|
|
pev->effects = 0; |
|
|
|
pev->effects = 0; |
|
|
|
STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" ); |
|
|
|
STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" ); |
|
|
|
} |
|
|
|
} |
|
|
|
pev->velocity = pev->velocity * 0.2 + vecTarget * flSpeed * 0.798; |
|
|
|
pev->velocity = pev->velocity * 0.2f + vecTarget * flSpeed * 0.798f; |
|
|
|
if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 ) |
|
|
|
if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Detonate(); |
|
|
|
Detonate(); |
|
|
|