Allow catch rpg rocket

This commit is contained in:
mittorn 2016-09-04 10:01:36 +00:00
parent 62bf3a537e
commit 8be1abd7b8
2 changed files with 14 additions and 0 deletions

View File

@ -263,10 +263,13 @@ void CRpgRocket::FollowThink( void )
STOP_SOUND( ENT( pev ), CHAN_VOICE, "weapons/rocket1.wav" );
}
pev->velocity = pev->velocity * 0.2 + vecTarget * flSpeed * 0.798;
/*
// WHY???
if( pev->waterlevel == 0 && pev->velocity.Length() < 1500 )
{
Detonate();
}
*/
}
// ALERT( at_console, "%.0f\n", flSpeed );

View File

@ -746,6 +746,17 @@ public:
void EXPORT RocketTouch( CBaseEntity *pOther );
static CRpgRocket *CreateRpgRocket( Vector vecOrigin, Vector vecAngles, CBaseEntity *pOwner, CRpg *pLauncher );
virtual float TouchGravGun( CBaseEntity *attacker, int stage )
{
pev->owner = attacker->edict();
if( stage >= 2 )
{
UTIL_MakeVectors( attacker->pev->v_angle + attacker->pev->punchangle);
pev->angles = UTIL_VecToAngles(gpGlobals->v_forward);
}
return 1000;
}
int m_iTrail;
float m_flIgniteTime;
CRpg *m_pLauncher;// pointer back to the launcher that fired me.