mirror of
https://github.com/YGGverse/hlsdk-portable.git
synced 2025-01-23 13:14:51 +00:00
Merge branch 'master' into opfor
This commit is contained in:
commit
811cfc967e
@ -286,9 +286,23 @@ void CTripmineGrenade::BeamBreakThink( void )
|
|||||||
// respawn detect.
|
// respawn detect.
|
||||||
if( !m_pBeam )
|
if( !m_pBeam )
|
||||||
{
|
{
|
||||||
|
#if TRIPMINE_BEAM_DUPLICATION_FIX
|
||||||
|
// Use the same trace parameters as the original trace above so the right entity is hit.
|
||||||
|
TraceResult tr2;
|
||||||
|
UTIL_TraceLine( pev->origin + m_vecDir * 8.0f, pev->origin - m_vecDir * 32.0f, dont_ignore_monsters, ENT( pev ), &tr2 );
|
||||||
|
#endif
|
||||||
MakeBeam();
|
MakeBeam();
|
||||||
|
#if TRIPMINE_BEAM_DUPLICATION_FIX
|
||||||
|
if( tr2.pHit )
|
||||||
|
{
|
||||||
|
// reset owner too
|
||||||
|
pev->owner = tr2.pHit;
|
||||||
|
m_hOwner = CBaseEntity::Instance( tr2.pHit );
|
||||||
|
}
|
||||||
|
#else
|
||||||
if( tr.pHit )
|
if( tr.pHit )
|
||||||
m_hOwner = CBaseEntity::Instance( tr.pHit ); // reset owner too
|
m_hOwner = CBaseEntity::Instance( tr.pHit ); // reset owner too
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
if( tr.fStartSolid || fabs( m_flBeamLength - tr.flFraction ) > 0.001f )
|
if( tr.fStartSolid || fabs( m_flBeamLength - tr.flFraction ) > 0.001f )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user