From 54cd6f7eb3982143eb301c41d723fdf40292a692 Mon Sep 17 00:00:00 2001 From: Peter Covington Date: Thu, 4 Aug 2022 23:31:21 -0400 Subject: [PATCH] Fixed captions not loading from vpks --- sp/src/game/client/hud_closecaption.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sp/src/game/client/hud_closecaption.cpp b/sp/src/game/client/hud_closecaption.cpp index e2d718c9..eb4a5ee4 100644 --- a/sp/src/game/client/hud_closecaption.cpp +++ b/sp/src/game/client/hud_closecaption.cpp @@ -2626,8 +2626,13 @@ void CHudCloseCaption::InitCaptionDictionary( const char *dbfile ) } char fullpath[MAX_PATH]; - Q_snprintf( fullpath, sizeof( fullpath ), "%s%s", path, dbfile ); - Q_FixSlashes( fullpath ); +#ifndef MAPBASE + Q_snprintf(fullpath, sizeof(fullpath), "%s%s", path, dbfile); + Q_FixSlashes(fullpath); +#else + V_ComposeFileName(path, dbfile, fullpath, sizeof(fullpath)); +#endif // !MAPBASE + if ( IsX360() ) { @@ -2692,8 +2697,7 @@ void CHudCloseCaption::AddAdditionalCaptionDictionary( const char *dbfile, CUtlV } char fullpath[MAX_PATH]; - Q_snprintf( fullpath, sizeof( fullpath ), "%s%s", path, dbfile ); - Q_FixSlashes( fullpath ); + V_ComposeFileName(path, dbfile, fullpath, sizeof(fullpath)); if ( IsX360() ) {