Skip to content

Commit 2c6a25a

Browse files
committed
1 parent 6df290b commit 2c6a25a

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

game/quiver/info_changelog.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ Added the following Source SDK Pull Requests:
8989
- #1537: Fix Entrance teleporters not using "mult_teleporter_recharge_rate"
9090
- #1535: Invis proxy refactor
9191
- #1533: MvM Tank support for Mappers/Vscripters
92+
- #1532: Fix team skins for tf_projectile_rocket
93+
- #1539: Allow weapons with penetrating bullets to penetrate Medigun shield
9294

9395
Details:
9496
- Fixed a bug where the mini-crit damage effect doesn't show up when your shield breaks.

src/game/shared/tf/tf_player_shared.cpp

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10897,7 +10897,12 @@ class CBulletPenetrateEnum : public IEntityEnumerator
1089710897
if ( pEnt == m_pShooter )
1089810898
return true;
1089910899

10900+
#ifdef BDSBASE
10901+
CTFMedigunShield* pMedigunShield = dynamic_cast<CTFMedigunShield*>(pEnt);
10902+
if (pEnt->IsCombatCharacter() || pEnt->IsBaseObject() || pMedigunShield)
10903+
#else
1090010904
if ( pEnt->IsCombatCharacter() || pEnt->IsBaseObject() )
10905+
#endif
1090110906
{
1090210907
if ( m_bIgnoreTeammates && pEnt->GetTeam() == m_pShooter->GetTeam() )
1090310908
return true;
@@ -11194,7 +11199,12 @@ void CTFPlayer::FireBullet( CTFWeaponBase *pWpn, const FireBulletsInfo_t &info,
1119411199
bool bPenetratingShot = ( (ePenetrateType == TF_DMG_CUSTOM_PENETRATE_ALL_PLAYERS) || (ePenetrateType == TF_DMG_CUSTOM_PENETRATE_MY_TEAM) || (ePenetrateType == TF_DMG_CUSTOM_PENETRATE_NONBURNING_TEAMMATE) );
1119511200
if ( bPenetratingShot && trace.m_pEnt )
1119611201
{
11202+
#ifdef BDSBASE
11203+
CTFMedigunShield* pMedigunShield = dynamic_cast<CTFMedigunShield*>(trace.m_pEnt);
11204+
if (trace.m_pEnt->IsCombatCharacter() || trace.m_pEnt->IsBaseObject() || pMedigunShield)
11205+
#else
1119711206
if ( trace.m_pEnt->IsCombatCharacter() || trace.m_pEnt->IsBaseObject() )
11207+
#endif
1119811208
{
1119911209
const float penetrationHullExtension = 40.0f;
1120011210
// Josh: EnumerateEntities only collides with bboxes, extend the ray to a larger hull, then we clip to it.
@@ -11310,6 +11320,9 @@ void CTFPlayer::FireBullet( CTFWeaponBase *pWpn, const FireBulletsInfo_t &info,
1131011320
dmgInfo.SetPlayerPenetrationCount( iPenetratedPlayerCount );
1131111321
pTarget->DispatchTraceAttack( dmgInfo, info.m_vecDirShooting, pTraceToUse, GetActiveWeapon() ? GetActiveWeapon()->GetDmgAccumulator() : NULL );
1131211322

11323+
#ifdef BDSBASE
11324+
CTFMedigunShield* pMedigunShield = dynamic_cast<CTFMedigunShield*>(pTarget);
11325+
#endif
1131311326
const bool bIsPenetratingPlayer = pTargetPlayer != NULL;
1131411327
if ( bIsPenetratingPlayer )
1131511328
{
@@ -11318,9 +11331,30 @@ void CTFPlayer::FireBullet( CTFWeaponBase *pWpn, const FireBulletsInfo_t &info,
1131811331
CALL_ATTRIB_HOOK_FLOAT_ON_OTHER( pWpn, flPenetrationPenalty, penetration_damage_penalty );
1131911332
dmgInfo.SetDamage( dmgInfo.GetDamage() * flPenetrationPenalty );
1132011333
}
11334+
#ifdef BDSBASE
11335+
else if (pMedigunShield)
11336+
{
11337+
CBaseEntity* pTFOwner = pMedigunShield->GetOwnerEntity();
11338+
if (pTFOwner)
11339+
{
11340+
int nShieldLevel = 0;
11341+
CALL_ATTRIB_HOOK_INT_ON_OTHER(pTFOwner, nShieldLevel, generate_rage_on_heal);
11342+
iPenetratedPlayerCount += nShieldLevel;
11343+
11344+
// Treat shield level 4 and higher inpenetrable, even by Sniper rifles
11345+
if (nShieldLevel >= 4)
11346+
break;
11347+
}
11348+
}
11349+
#endif
1132111350

11351+
#ifdef BDSBASE
11352+
// If we're only supposed to penetrate players and this thing isn't a player or medigun shield, stop here.
11353+
if (!bIsPenetratingPlayer && (ePenetrateType == TF_DMG_CUSTOM_PENETRATE_ALL_PLAYERS) && !pMedigunShield)
11354+
#else
1132211355
// If we're only supposed to penetrate players and this thing isn't a player, stop here.
1132311356
if ( !bIsPenetratingPlayer && (ePenetrateType == TF_DMG_CUSTOM_PENETRATE_ALL_PLAYERS) )
11357+
#endif
1132411358
break;
1132511359
}
1132611360
else

0 commit comments

Comments
 (0)