Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions src/game/shared/baseentity_shared.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2111,19 +2111,6 @@ void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
}
#endif // NEO

#ifdef NEO
// The below penetration value check relies an all possible surfaces
// incurring a non-zero cost to m_flPenetration.
for (int i = 0; i < ARRAYSIZE(PENETRATION_RESISTANCE); ++i)
{
Assert(PENETRATION_RESISTANCE[i] > 0);
}
// Only draw tracers if we haven't yet penetrated, because the penetration logic is reentrant
// and would otherwise draw multiple tracers per shot.
Assert(neoWeapon);
if (neoWeapon->GetPenetration() == info.m_flPenetration)
{
#endif
if ( ( info.m_iTracerFreq != 0 ) && ( tracerCount++ % info.m_iTracerFreq ) == 0 && ( bHitGlass == false ) )
{
if ( bDoServerEffects == true )
Expand Down Expand Up @@ -2174,9 +2161,6 @@ void CBaseEntity::FireBullets( const FireBulletsInfo_t &info )
}
#endif
}
#ifdef NEO
}
#endif

//NOTENOTE: We could expand this to a more general solution for various material penetration types (wood, thin metal, etc)

Expand Down Expand Up @@ -2376,7 +2360,9 @@ void CBaseEntity::HandleShotPenetration(const FireBulletsInfo_t& info,
behindMaterialInfo.m_vecSpread = vec3_origin;
behindMaterialInfo.m_flDistance = info.m_flDistance * (1.0f - tr.fraction);
behindMaterialInfo.m_iAmmoType = info.m_iAmmoType;
behindMaterialInfo.m_iTracerFreq = info.m_iTracerFreq;
// Only draw tracers if we haven't yet penetrated, because the penetration logic is reentrant
// and would otherwise draw multiple tracers per shot.
behindMaterialInfo.m_iTracerFreq = 0;
behindMaterialInfo.m_flDamage = info.m_flDamage * Max(0.25f, (1.f - (penUsed / info.m_flPenetration)));
behindMaterialInfo.m_pAttacker = info.m_pAttacker ? info.m_pAttacker : this;
behindMaterialInfo.m_nFlags = info.m_nFlags;
Expand Down
Loading