mirror of
https://github.com/ValveSoftware/source-sdk-2013.git
synced 2025-04-07 10:35:23 +00:00
Commit Mistake of Pythagoras source files.
Fixed: - "Could not load library client." when launching the mod. - Scene files not playing. - In-game menu. - Gameinfo.txt now has correct parameters Tweaks: - light.rad for glowing textures as seen in maps such as ks_mop_pita1, ks_mop_pita2. Changes: - Map ks_mop_pita1 Increased height of trigger responsible for launching the door blast sequence. Due to a level design error, this event would not occur since the strider's bounding volume would not touch it. - Map ks_mop_pita3 Added extra output to trigger relays to continue through teleport sequence. This is used to overcome a particulars bugs where track pathers entities would fail to reach their destinations, thus not reaching their final destination, which are responsible for triggering future event relays.
This commit is contained in:
parent
0d8dceea43
commit
a2b76167c0
3 changed files with 103 additions and 0 deletions
|
@ -804,6 +804,59 @@ 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 ) );
|
||||
|
@ -846,6 +899,7 @@ CChoreoScene *C_SceneEntity::LoadScene( const char *filename )
|
|||
|
||||
delete[] pBuffer;
|
||||
return pScene;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -160,6 +160,9 @@ 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 )
|
||||
{
|
||||
|
@ -176,6 +179,7 @@ bool Flashlight_UseLegacyVersion( void )
|
|||
|
||||
// Return the results
|
||||
return g_bUseLegacyFlashlight;
|
||||
#endif
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
|
|
@ -3345,6 +3345,50 @@ 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];
|
||||
|
@ -3377,6 +3421,7 @@ CChoreoScene *CSceneEntity::LoadScene( const char *filename, IChoreoEventCallbac
|
|||
|
||||
FreeSceneFileMemory( pBuffer );
|
||||
return pScene;
|
||||
#endif
|
||||
}
|
||||
|
||||
CChoreoScene *BlockingLoadScene( const char *filename )
|
||||
|
|
Loading…
Reference in a new issue