diff --git a/sp/src/game/server/hl2/npc_manhack.cpp b/sp/src/game/server/hl2/npc_manhack.cpp index 5dc22f8f6..32a050b10 100644 --- a/sp/src/game/server/hl2/npc_manhack.cpp +++ b/sp/src/game/server/hl2/npc_manhack.cpp @@ -3007,9 +3007,12 @@ void CNPC_Manhack::OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t r } else { + // FIX: Remember the current owner in case we are from a npc_template_maker/npc_maker. + m_pPrevOwner.Set(GetOwnerEntity()); + // Suppress collisions between the manhack and the player; we're currently bumping // almost certainly because it's not purely a physics object. - SetOwnerEntity( pPhysGunUser ); + SetOwnerEntity(pPhysGunUser); m_bHeld = true; } } @@ -3022,8 +3025,11 @@ void CNPC_Manhack::OnPhysGunPickup( CBasePlayer *pPhysGunUser, PhysGunPickup_t r //----------------------------------------------------------------------------- void CNPC_Manhack::OnPhysGunDrop( CBasePlayer *pPhysGunUser, PhysGunDrop_t Reason ) { - // Stop suppressing collisions between the manhack and the player - SetOwnerEntity( NULL ); + // Stop suppressing collisions between the manhack and the player + SetOwnerEntity(m_pPrevOwner.Get()); + + // Reset previous owner back to NULL. + m_pPrevOwner.Set(NULL); m_bHeld = false; diff --git a/sp/src/game/server/hl2/npc_manhack.h b/sp/src/game/server/hl2/npc_manhack.h index c80ca22eb..989ea293a 100644 --- a/sp/src/game/server/hl2/npc_manhack.h +++ b/sp/src/game/server/hl2/npc_manhack.h @@ -254,6 +254,7 @@ private: CSprite *m_pLightGlow; CHandle m_hSmokeTrail; + CHandle m_pPrevOwner; int m_iPanel1; int m_iPanel2;