This commit is contained in:
Raphael 2024-02-04 22:59:41 +02:00 committed by GitHub
commit e8817f03b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 13 additions and 0 deletions

View File

@ -688,7 +688,9 @@ void JoltPhysicsEnvironment::DestroyShadowController( IPhysicsShadowController *
{
JoltPhysicsShadowController *pController = static_cast< JoltPhysicsShadowController * >( pShadowController );
Erase( m_pPhysicsControllers, pController );
#ifdef GAME_GMOD
delete pController;
#endif
}
//-------------------------------------------------------------------------------------------------
@ -704,7 +706,9 @@ void JoltPhysicsEnvironment::DestroyPlayerController( IPhysicsPlayerController *
{
JoltPhysicsPlayerController *pController = static_cast< JoltPhysicsPlayerController * >( pPlayerController );
Erase( m_pPhysicsControllers, pController );
#ifdef GAME_GMOD
delete pController;
#endif
}
//-------------------------------------------------------------------------------------------------
@ -720,7 +724,9 @@ void JoltPhysicsEnvironment::DestroyMotionController( IPhysicsMotionController *
{
JoltPhysicsMotionController *pJoltController = static_cast< JoltPhysicsMotionController * >( pController );
Erase( m_pPhysicsControllers, pJoltController );
#ifdef GAME_GMOD
delete pJoltController;
#endif
}
//-------------------------------------------------------------------------------------------------
@ -738,7 +744,9 @@ void JoltPhysicsEnvironment::DestroyVehicleController( IPhysicsVehicleController
{
JoltPhysicsVehicleController *pJoltController = static_cast<JoltPhysicsVehicleController *>( pVehicleController );
Erase( m_pPhysicsControllers, pJoltController );
#ifdef GAME_GMOD
delete pJoltController;
#endif
}
//-------------------------------------------------------------------------------------------------

View File

@ -106,7 +106,10 @@ InitReturnVal_t JoltPhysicsInterface::Init()
void JoltPhysicsInterface::Shutdown()
{
#ifdef GAME_GMOD
delete m_pJobSystem;
#endif
delete m_pTempAllocator;
delete JPH::Factory::sInstance;
@ -128,7 +131,9 @@ IPhysicsEnvironment *JoltPhysicsInterface::CreateEnvironment()
void JoltPhysicsInterface::DestroyEnvironment( IPhysicsEnvironment *pEnvironment )
{
#ifdef GAME_GMOD
delete static_cast<JoltPhysicsEnvironment *>( pEnvironment );
#endif
}
IPhysicsEnvironment *JoltPhysicsInterface::GetActiveEnvironmentByIndex( int index )