Skip to content

Commit e395a96

Browse files
committed
more crash / error fixes
1 parent e96946a commit e395a96

2 files changed

Lines changed: 11 additions & 8 deletions

File tree

src/game/client/tf/c_tf_player.cpp

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8479,12 +8479,15 @@ void C_TFPlayer::CreateSaveMeEffect( MedicCallerType nType /*= CALLER_TYPE_NORMA
84798479

84808480
if ( nType == CALLER_TYPE_AUTO )
84818481
{
8482-
m_pSaveMeEffect = ParticleProp()->Create( "speech_mediccall_auto", PATTACH_POINT_FOLLOW, "head" );
8483-
// sound should only play if they're close and we're not already healing them.
8484-
const float flDistSq = GetAbsOrigin().DistToSqr( pLocalPlayer->GetAbsOrigin() );
8485-
if ( flDistSq < 1000 * 1000 && ( !pLocalPlayer->MedicGetHealTarget() || ToTFPlayer( pLocalPlayer->MedicGetHealTarget() ) != this ) )
8482+
if ( pLocalPlayer )
84868483
{
8487-
EmitSound( "Medic.AutoCallerAnnounce" );
8484+
m_pSaveMeEffect = ParticleProp()->Create( "speech_mediccall_auto", PATTACH_POINT_FOLLOW, "head" );
8485+
// sound should only play if they're close and we're not already healing them.
8486+
const float flDistSq = GetAbsOrigin().DistToSqr( pLocalPlayer->GetAbsOrigin() );
8487+
if ( flDistSq < 1000 * 1000 && ( !pLocalPlayer->MedicGetHealTarget() || ToTFPlayer( pLocalPlayer->MedicGetHealTarget() ) != this ) )
8488+
{
8489+
EmitSound( "Medic.AutoCallerAnnounce" );
8490+
}
84888491
}
84898492
}
84908493
else

src/game/server/tf/tf_player.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,10 +1793,10 @@ void CTFPlayer::TFPlayerThink()
17931793

17941794
if ( nClip >= 0 && nClip != m_nActiveWpnClipPrev )
17951795
{
1796-
if ( nClip > 500 )
1796+
if ( nClip > UINT16_MAX )
17971797
{
1798-
Warning( "Heal Target: ClipSize Data Limit Exceeded: %d (max 500)\n", nClip );
1799-
nClip = MIN( nClip, 500 );
1798+
Warning( "Heal Target: ClipSize Data Limit Exceeded: %d (max %d)\n", nClip, UINT16_MAX );
1799+
nClip = MIN( nClip, UINT16_MAX );
18001800
}
18011801
m_nActiveWpnClip.Set( nClip );
18021802
m_nActiveWpnClipPrev = m_nActiveWpnClip;

0 commit comments

Comments
 (0)