Browse Source

Allow catch rpg rocket

hlzbot-dirty
mittorn 8 years ago
parent
commit
8be1abd7b8
  1. 3
      dlls/rpg.cpp
  2. 11
      dlls/weapons.h

3
dlls/rpg.cpp

@ -263,10 +263,13 @@ void CRpgRocket::FollowThink( void ) @@ -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 );

11
dlls/weapons.h

@ -746,6 +746,17 @@ public: @@ -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.

Loading…
Cancel
Save