This commit is contained in:
speedvoltage 2025-04-04 18:57:48 +03:00 committed by GitHub
commit 2210ad40e1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1139,6 +1139,9 @@ bool CTraceFilterMelee::ShouldHitEntity( IHandleEntity *pHandleEntity, int conte
if ( pEntity->m_takedamage == DAMAGE_NO )
return false;
if ( m_pPassEnt && !pEntity->CanBeHitByMeleeAttack( const_cast< CBaseEntity * >( EntityFromEntityHandle( m_pPassEnt ) ) ) )
return false;
// FIXME: Do not translate this to the driver because the driver only accepts damage from the vehicle
// Translate the vehicle into its driver for damage
/*
@ -1182,7 +1185,8 @@ bool CTraceFilterMelee::ShouldHitEntity( IHandleEntity *pHandleEntity, int conte
}
else
{
m_pHit = pEntity;
if ( !m_pHit )
m_pHit = pEntity;
// Make sure if the player is holding this, he drops it
Pickup_ForcePlayerToDropThisObject( pEntity );