diff --git a/dlls/physcallback.h b/dlls/physcallback.h index 1db276e0..305102aa 100644 --- a/dlls/physcallback.h +++ b/dlls/physcallback.h @@ -19,6 +19,7 @@ #include "physint.h" // Must be provided by user of this code +extern BOOL gPhysicsInterfaceInitialized; extern server_physics_api_t g_physfuncs; // The actual physic callbacks diff --git a/dlls/world.cpp b/dlls/world.cpp index 4ac56925..089db6b5 100644 --- a/dlls/world.cpp +++ b/dlls/world.cpp @@ -822,6 +822,8 @@ static physics_interface_t gPhysicsInterface = DispatchPhysicsEntity, }; +BOOL gPhysicsInterfaceInitialized = FALSE; + int Server_GetPhysicsInterface( int iVersion, server_physics_api_t *pfuncsFromEngine, physics_interface_t *pFunctionTable ) { if( !pFunctionTable || !pfuncsFromEngine || iVersion != SV_PHYSICS_INTERFACE_VERSION ) @@ -835,5 +837,6 @@ int Server_GetPhysicsInterface( int iVersion, server_physics_api_t *pfuncsFromEn // fill engine callbacks memcpy( pFunctionTable, &gPhysicsInterface, sizeof(physics_interface_t) ); + gPhysicsInterfaceInitialized = TRUE; return TRUE; }