From 8be1abd7b822675a50bdcfff194c450f79616e9d Mon Sep 17 00:00:00 2001 From: mittorn Date: Sun, 4 Sep 2016 10:01:36 +0000 Subject: [PATCH] Allow catch rpg rocket --- dlls/rpg.cpp | 3 +++ dlls/weapons.h | 11 +++++++++++ 2 files changed, 14 insertions(+) diff --git a/dlls/rpg.cpp b/dlls/rpg.cpp index 1fec5cf1..12c4b599 100644 --- a/dlls/rpg.cpp +++ b/dlls/rpg.cpp @@ -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 ); diff --git a/dlls/weapons.h b/dlls/weapons.h index 4bf0518b..20f1b354 100644 --- a/dlls/weapons.h +++ b/dlls/weapons.h @@ -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.