Skip to content
Open
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
25 changes: 25 additions & 0 deletions src/game/client/tf/vgui/tf_playermodelpanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,10 @@
#include "halloween/tf_weapon_spellbook.h"
#include "matsys_controls/matsyscontrols.h"

#ifdef MAPBASE
#include "filesystem.h"
#endif

// memdbgon must be the last include file in a .cpp file!!!
#include <tier0/memdbgon.h>

Expand Down Expand Up @@ -406,6 +410,26 @@ CChoreoScene *LoadSceneForModel( const char *filename, IChoreoEventCallback *pCa
V_SetExtension( loadfile, ".vcd", sizeof( loadfile ) );
V_FixSlashes( loadfile );

#ifdef MAPBASE
//
// Raw scene file support
//
char *pBuffer = NULL;
size_t bufsize = scenefilecache->GetSceneBufferSize( loadfile );
if ( bufsize > 0 )
{
pBuffer = new char[ bufsize ];
if ( !scenefilecache->GetSceneData( filename, (byte *)pBuffer, bufsize ) )
{
delete[] pBuffer;
return NULL;
}
}
else if ( !filesystem->ReadFileEx( loadfile, NULL, (void **)&pBuffer, true ) )
{
return NULL;
}
#else
char *pBuffer = NULL;
size_t bufsize = scenefilecache->GetSceneBufferSize( loadfile );
if ( bufsize <= 0 )
Expand All @@ -417,6 +441,7 @@ CChoreoScene *LoadSceneForModel( const char *filename, IChoreoEventCallback *pCa
delete[] pBuffer;
return NULL;
}
#endif

CChoreoScene *pScene;
if ( IsBufferBinaryVCD( pBuffer, bufsize ) )
Expand Down
Loading