Skip to content

Commit

Permalink
Changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Marc-Antoine Lortie committed Dec 7, 2016
1 parent 90c61bf commit 01d4e64
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 103 deletions.
54 changes: 0 additions & 54 deletions sp/src/game/client/c_sceneentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -804,59 +804,6 @@ CChoreoStringPool g_ChoreoStringPool;

CChoreoScene *C_SceneEntity::LoadScene( const char *filename )
{
#if defined ( MOP_CLIENT_DLL )

char loadfile[MAX_PATH];
Q_strncpy( loadfile, filename, sizeof( loadfile ) );
Q_SetExtension( loadfile, ".vcd", sizeof( loadfile ) );
Q_FixSlashes( loadfile );

void *pBuffer = 0;
CChoreoScene *pScene = NULL;

int fileSize = filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, true );
if (fileSize)
{
g_TokenProcessor.SetBuffer((char*)pBuffer);
pScene = ChoreoLoadScene( loadfile, this, &g_TokenProcessor, Scene_Printf );
}
else
{
fileSize = scenefilecache->GetSceneBufferSize( loadfile );
if ( fileSize <= 0 )
return NULL;

pBuffer = new char[ fileSize ];
if ( !scenefilecache->GetSceneData( filename, (byte *)pBuffer, fileSize ) )
{
delete[] pBuffer;
return NULL;
}


if ( IsBufferBinaryVCD( (char*)pBuffer, fileSize ) )
{
pScene = new CChoreoScene( this );
CUtlBuffer buf( pBuffer, fileSize, CUtlBuffer::READ_ONLY );
if ( !pScene->RestoreFromBinaryBuffer( buf, loadfile, &g_ChoreoStringPool ) )
{
Warning( "Unable to restore scene '%s'\n", loadfile );
delete pScene;
pScene = NULL;
}
}
}

if(pScene)
{
pScene->SetPrintFunc( Scene_Printf );
pScene->SetEventCallbackInterface( this );
}

delete[] pBuffer;
return pScene;
#else

char loadfile[ 512 ];
Q_strncpy( loadfile, filename, sizeof( loadfile ) );
Q_SetExtension( loadfile, ".vcd", sizeof( loadfile ) );
Expand Down Expand Up @@ -899,7 +846,6 @@ CChoreoScene *C_SceneEntity::LoadScene( const char *filename )

delete[] pBuffer;
return pScene;
#endif
}


Expand Down
4 changes: 0 additions & 4 deletions sp/src/game/server/hl2/hl2_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,9 +160,6 @@ bool g_bCacheLegacyFlashlightStatus = true;
bool g_bUseLegacyFlashlight;
bool Flashlight_UseLegacyVersion( void )
{
#if defined ( MOP_DLL )
return true;
#else
// If this is the first run through, cache off what the answer should be (cannot change during a session)
if ( g_bCacheLegacyFlashlightStatus )
{
Expand All @@ -179,7 +176,6 @@ bool Flashlight_UseLegacyVersion( void )

// Return the results
return g_bUseLegacyFlashlight;
#endif
}

//-----------------------------------------------------------------------------
Expand Down
45 changes: 0 additions & 45 deletions sp/src/game/server/sceneentity.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3345,50 +3345,6 @@ bool CSceneEntity::ShouldNetwork() const

CChoreoScene *CSceneEntity::LoadScene( const char *filename, IChoreoEventCallback *pCallback )
{
#if defined ( MOP_DLL )
DevMsg(2, "Blocking load of scene from '%s'\n", filename);

char loadfile[MAX_PATH];
Q_strncpy( loadfile, filename, sizeof( loadfile ) );
Q_SetExtension( loadfile, ".vcd", sizeof( loadfile ) );
Q_FixSlashes( loadfile );

void *pBuffer = 0;
CChoreoScene *pScene = NULL;

int fileSize = filesystem->ReadFileEx( loadfile, "MOD", &pBuffer, true );
if (fileSize)
{
g_TokenProcessor.SetBuffer((char*)pBuffer);
pScene = ChoreoLoadScene( loadfile, NULL, &g_TokenProcessor, LocalScene_Printf );
}
else
{
// binary compiled vcd
pScene = new CChoreoScene( NULL );
if ( !CopySceneFileIntoMemory( loadfile, &pBuffer, &fileSize ) )
{
MissingSceneWarning( loadfile );
return NULL;
}
CUtlBuffer buf( pBuffer, fileSize, CUtlBuffer::READ_ONLY );
if ( !pScene->RestoreFromBinaryBuffer( buf, loadfile, &g_ChoreoStringPool ) )
{
Warning( "CSceneEntity::LoadScene: Unable to load scene '%s'\n", loadfile );
delete pScene;
pScene = NULL;
}
}

if (pScene)
{
pScene->SetPrintFunc(LocalScene_Printf);
pScene->SetEventCallbackInterface(pCallback);
}

FreeSceneFileMemory(pBuffer);
return pScene;
#else
DevMsg( 2, "Blocking load of scene from '%s'\n", filename );

char loadfile[MAX_PATH];
Expand Down Expand Up @@ -3421,7 +3377,6 @@ CChoreoScene *CSceneEntity::LoadScene( const char *filename, IChoreoEventCallbac

FreeSceneFileMemory( pBuffer );
return pScene;
#endif
}

CChoreoScene *BlockingLoadScene( const char *filename )
Expand Down

0 comments on commit 01d4e64

Please sign in to comment.