Readded all delete statements for Gmod.

If the workflow compiles it, it works fine?
This commit is contained in:
RaphaelIT7 2023-11-04 02:59:23 +01:00
parent 1d4db16dd6
commit 17a5f973ae
2 changed files with 19 additions and 6 deletions

View File

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

View File

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