source-engine-2018-hl2_src/utils/common/physdll.cpp

32 lines
685 B
C++
Raw Normal View History

2020-04-23 00:56:21 +08:00
//========= Copyright Valve Corporation, All rights reserved. ============//
//
// Purpose:
//
// $NoKeywords: $
//
//=============================================================================//
#include <stdio.h>
#include "physdll.h"
#include "filesystem_tools.h"
static CSysModule *pPhysicsModule = NULL;
CreateInterfaceFn GetPhysicsFactory( void )
{
if ( !pPhysicsModule )
{
pPhysicsModule = g_pFullFileSystem->LoadModule( "VPHYSICS.DLL" );
if ( !pPhysicsModule )
return NULL;
}
return Sys_GetFactory( pPhysicsModule );
}
void PhysicsDLLPath( const char *pPathname )
{
if ( !pPhysicsModule )
{
pPhysicsModule = g_pFullFileSystem->LoadModule( pPathname );
}
}