Skip to content

Commit b2705ba

Browse files
committed
Sync latest code from Team Fortress 2
- Latest code as of 2025/11/07
1 parent 010c5cb commit b2705ba

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+282
-112
lines changed

src/game/client/c_baseplayer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,9 +418,10 @@ LINK_ENTITY_TO_CLASS( player, C_BasePlayer );
418418
C_BasePlayer::C_BasePlayer() : m_iv_vecViewOffset( "C_BasePlayer::m_iv_vecViewOffset" )
419419
{
420420
AddVar( &m_vecViewOffset, &m_iv_vecViewOffset, LATCH_SIMULATION_VAR );
421+
421422
AddVar( &m_Local.m_vecPunchAngle, &m_Local.m_iv_vecPunchAngle, LATCH_SIMULATION_VAR );
422423
AddVar( &m_Local.m_vecPunchAngleVel, &m_Local.m_iv_vecPunchAngleVel, LATCH_SIMULATION_VAR );
423-
424+
424425
#ifdef _DEBUG
425426
m_vecLadderNormal.Init();
426427
m_vecOldViewAngles.Init();

src/game/client/hud_basechat.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1869,4 +1869,4 @@ void CBaseHudChat::FireGameEvent( IGameEvent *event )
18691869
ChatPrintf( player->entindex(), CHAT_FILTER_NONE, "(SourceTV) %s", event->GetString( "text" ) );
18701870
}
18711871
#endif
1872-
}
1872+
}

src/game/client/tf/c_obj_sentrygun.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -758,9 +758,9 @@ const char* C_ObjectSentrygun::GetStatusName() const
758758
//-----------------------------------------------------------------------------
759759
// Purpose:
760760
//-----------------------------------------------------------------------------
761-
C_SentrygunShield* C_SentrygunShield::Create( const char* pszModelName )
761+
C_SentrygunShield *C_SentrygunShield::Create( const char *pszModelName )
762762
{
763-
C_SentrygunShield* pShield = new C_SentrygunShield();
763+
C_SentrygunShield *pShield = new C_SentrygunShield();
764764
if ( !pShield )
765765
return NULL;
766766

@@ -800,4 +800,4 @@ void C_SentrygunShield::StartFadeOut( float flDuration )
800800
m_flFadeOutStartTime = gpGlobals->curtime;
801801
m_flFadeOutEndTime = gpGlobals->curtime + flDuration;
802802
SetNextClientThink( gpGlobals->curtime );
803-
}
803+
}

src/game/client/tf/c_obj_sentrygun.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ class C_SentrygunShield : public C_BaseAnimating
3535
DECLARE_CLASS( C_SentrygunShield, C_BaseAnimating );
3636

3737
public:
38-
static C_SentrygunShield* Create( const char* pszModelName );
38+
static C_SentrygunShield *Create( const char *pszModelName );
3939

4040
virtual void ClientThink();
4141

@@ -46,6 +46,7 @@ class C_SentrygunShield : public C_BaseAnimating
4646
float m_flFadeOutEndTime;
4747
};
4848

49+
4950
//-----------------------------------------------------------------------------
5051
// Purpose: Sentry object
5152
//-----------------------------------------------------------------------------

src/game/client/tf/c_tf_player.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11611,6 +11611,7 @@ void C_TFPlayer::ClientAdjustVOPitch( int& pitch )
1161111611
{
1161211612
pitch *= 1.3f;
1161311613
}
11614+
1161411615
// Halloween voice futzery?
1161511616
float flVoicePitchScale = 1.f;
1161611617
CALL_ATTRIB_HOOK_FLOAT( flVoicePitchScale, voice_pitch_scale );

src/game/client/tf/tf_hud_account.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ class CAccountPanel : public EditablePanel
198198
virtual const char *GetResFileName( void ) { return "resource/UI/HudAccountPanel.res"; }
199199

200200
protected:
201-
virtual Color GetColor( const account_delta_t::eAccountDeltaType_t& type, const int iDeltaValue = 0 );
201+
virtual Color GetColor( const account_delta_t::eAccountDeltaType_t &type, const int iDeltaValue = 0 );
202202

203203
CUtlVector <account_delta_t> m_AccountDeltaItems;
204204

@@ -1038,15 +1038,15 @@ account_delta_t *CAccountPanel::OnAccountValueChanged( int iOldValue, int iNewVa
10381038
return NULL;
10391039
}
10401040

1041-
Color CAccountPanel::GetColor( const account_delta_t::eAccountDeltaType_t& type, const int iDeltaValue )
1041+
Color CAccountPanel::GetColor( const account_delta_t::eAccountDeltaType_t &type, const int iDeltaValue )
10421042
{
10431043
if ( type == account_delta_t::ACCOUNT_DELTA_BONUS_POINTS )
10441044
{
10451045
return m_DeltaEventColor;
10461046
}
10471047
else if ( type == account_delta_t::ACCOUNT_DELTA_HEALING )
10481048
{
1049-
return iDeltaValue < 0 ? m_DeltaNegativeColor : m_DeltaPositiveColor;
1049+
return ( iDeltaValue < 0 ) ? m_DeltaNegativeColor : m_DeltaPositiveColor;
10501050
}
10511051
else if ( type == account_delta_t::ACCOUNT_DELTA_DAMAGE )
10521052
{

src/game/client/tf/vgui/charinfo_armory_subpanel.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include <tier0/memdbgon.h>
2424

2525
ConVar tf_explanations_charinfo_armory_panel( "tf_explanations_charinfo_armory_panel", "0", FCVAR_ARCHIVE, "Whether the user has seen explanations for this panel." );
26-
ConVar tf_armory_page_skip( "tf_armory_page_skip", "10", FCVAR_ARCHIVE, "Number of pages to skip in the Mann Co. Catalogue.", true, 1, true, 100 );
26+
ConVar tf_armory_page_skip( "tf_armory_page_skip", "10", FCVAR_ARCHIVE, "Number of pages to skip in the Mann Co. Catalog", true, 1, true, 100 );
2727

2828
const char *g_szArmoryFilterStrings[ARMFILT_TOTAL] =
2929
{
@@ -308,61 +308,61 @@ void CArmoryPanel::OnClosing()
308308
//-----------------------------------------------------------------------------
309309
void CArmoryPanel::OnCommand( const char *command )
310310
{
311-
if (!Q_stricmp(command, "prevpage"))
311+
if ( !Q_stricmp( command, "prevpage" ) )
312312
{
313-
if (m_iFilterPage > 0)
313+
if ( m_iFilterPage > 0 )
314314
{
315315
m_iFilterPage--;
316316
}
317317
else
318318
{
319-
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
319+
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
320320
}
321321
UpdateItemList();
322322
UpdateSelectedItem();
323323
}
324-
else if (!Q_stricmp(command, "prevpageskip"))
324+
else if ( !Q_stricmp( command, "prevpageskip" ) )
325325
{
326-
for (int i = 0; i < tf_armory_page_skip.GetInt(); i++)
326+
for ( int i = 0; i < tf_armory_page_skip.GetInt(); i++ )
327327
{
328-
if (m_iFilterPage > 0)
328+
if ( m_iFilterPage > 0 )
329329
{
330330
m_iFilterPage--;
331331
}
332332
else
333333
{
334-
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
334+
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
335335
}
336336
}
337337
UpdateItemList();
338338
UpdateSelectedItem();
339339
}
340-
else if (!Q_stricmp(command, "skiptostart"))
340+
else if ( !Q_stricmp( command, "skiptostart" ) )
341341
{
342342
m_iFilterPage = 0;
343343
UpdateItemList();
344344
UpdateSelectedItem();
345345
}
346-
else if (!Q_stricmp(command, "nextpage"))
346+
else if ( !Q_stricmp( command, "nextpage" ) )
347347
{
348348
m_iFilterPage++;
349-
if (m_iFilterPage > ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1)
349+
if ( m_iFilterPage > ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1 )
350350
{
351351
m_iFilterPage = 0;
352352
}
353353
UpdateItemList();
354354
UpdateSelectedItem();
355355
}
356-
else if (!Q_stricmp(command, "nextpageskip"))
356+
else if ( !Q_stricmp( command, "nextpageskip" ) )
357357
{
358-
uint32 unNumPages = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns));
359-
m_iFilterPage = ((m_iFilterPage + tf_armory_page_skip.GetInt()) % unNumPages);
358+
uint32 unNumPages = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) );
359+
m_iFilterPage = ( ( m_iFilterPage + tf_armory_page_skip.GetInt() ) % unNumPages );
360360
UpdateItemList();
361361
UpdateSelectedItem();
362362
}
363-
else if (!Q_stricmp(command, "skiptoend"))
363+
else if ( !Q_stricmp( command, "skiptoend" ) )
364364
{
365-
m_iFilterPage = ceil(m_FilteredItemList.Count() / (float)(m_iThumbnailRows * m_iThumbnailColumns)) - 1;
365+
m_iFilterPage = ceil( m_FilteredItemList.Count() / (float)( m_iThumbnailRows * m_iThumbnailColumns ) ) - 1;
366366
UpdateItemList();
367367
UpdateSelectedItem();
368368
}
@@ -400,7 +400,7 @@ void CArmoryPanel::OnCommand( const char *command )
400400
ELanguage iLang = PchLanguageToELanguage( uilanguage );
401401

402402
char szURL[512];
403-
Q_snprintf( szURL, sizeof(szURL), "https://wiki.teamfortress.com/scripts/itemredirect.php?id=%d&lang=%s", m_SelectedItem.GetItemDefIndex(), GetLanguageICUName( iLang ) );
403+
Q_snprintf( szURL, sizeof( szURL ), "https://wiki.teamfortress.com/scripts/itemredirect.php?id=%d&lang=%s", m_SelectedItem.GetItemDefIndex(), GetLanguageICUName( iLang ) );
404404
steamapicontext->SteamFriends()->ActivateGameOverlayToWebPage( szURL );
405405

406406
C_CTF_GameStats.Event_Catalog( IE_ARMORY_BROWSE_WIKI, NULL, &m_SelectedItem );

src/game/client/tf/vgui/tf_matchmaking_dashboard_party_member.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ void CDashboardPartyMember::OnCommand( const char *command )
392392
{
393393
case MEMBER_PRESENT:
394394
{
395-
// You can always send a message to party memebers
395+
// You can always send a message to party members
396396
contextMenuBuilder.AddMenuItem( "#TF_Friends_SendMessage", new KeyValues( "Context_SendMessage" ), "party" );
397397

398398
// If we're the leader, we can kick

src/game/client/tf/workshop/item_import.cpp

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ static const char *kBodygroupArray[] =
8888
"headphones",
8989
"shoes",
9090
"shoes_socks",
91+
"bullets"
9192
};
9293

9394
extern IFileSystem *g_pFullFileSystem;
@@ -6998,6 +6999,9 @@ CTFFileImportDialog::LOAD_RESULT CTFFileImportDialog::LoadTxt( const char *pszFi
69986999
}
69997000
}
70007001

7002+
char szFileBase[ MAX_PATH ];
7003+
V_FileBase( pszSourceFile, szFileBase, sizeof( szFileBase ) );
7004+
70017005
LOAD_RESULT result = SetAnimationSource( nClassIndex, pszSourceFile );
70027006
if ( result != LOAD_OKAY )
70037007
{
@@ -7013,6 +7017,23 @@ CTFFileImportDialog::LOAD_RESULT CTFFileImportDialog::LoadTxt( const char *pszFi
70137017
V_ComposeFileName( pszBasePath, pszVCDFile, pszLoadPath, sizeof(pszLoadPath) );
70147018
pszVCDFile = pszLoadPath;
70157019
}
7020+
7021+
if ( !g_pFullFileSystem->FileExists( pszVCDFile, "MOD" ) )
7022+
{
7023+
const char *pszTempVCDFile = pszVCDFile;
7024+
7025+
// If the file isn't found using the path in the manifest, let's look where we think it should be on disk.
7026+
// We're sometimes seeing absolute paths for the creator's hard drive in the manifest for the vcd_file.
7027+
char szFallbackTest[ MAX_PATH ];
7028+
V_sprintf_safe( szFallbackTest, "%sgame\\scenes\\%s\\player\\%s\\low\\%s.vcd", pszBasePath, GetWorkshopFolder(), kClassFolders[ nClassIndex ], szFileBase );
7029+
pszVCDFile = szFallbackTest;
7030+
7031+
if ( !g_pFullFileSystem->FileExists( pszVCDFile, "MOD" ) )
7032+
{
7033+
// Set it back to the original value and let it fail below.
7034+
pszVCDFile = pszTempVCDFile;
7035+
}
7036+
}
70167037
}
70177038

70187039
result = SetAnimationVCD( nClassIndex, pszVCDFile );

src/game/server/ai_behavior_assault.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1257,7 +1257,7 @@ int CAI_AssaultBehavior::TranslateSchedule( int scheduleType )
12571257
break;
12581258

12591259
case SCHED_HOLD_RALLY_POINT:
1260-
if( HasCondition(COND_NO_PRIMARY_AMMO) | HasCondition(COND_LOW_PRIMARY_AMMO) )
1260+
if( HasCondition(COND_NO_PRIMARY_AMMO) || HasCondition(COND_LOW_PRIMARY_AMMO) )
12611261
{
12621262
return SCHED_RELOAD;
12631263
}

0 commit comments

Comments
 (0)