Made JoltPhysicsObject::GetName() functional
continuous-integration/drone/push Build is passing Details

This commit is contained in:
RaphaelIT7 2023-10-02 00:36:44 +02:00 committed by Joshie
parent 50cef39716
commit c63e5211b3
2 changed files with 3 additions and 2 deletions

View File

@ -31,6 +31,7 @@ JoltPhysicsObject::JoltPhysicsObject( JPH::Body *pBody, JoltPhysicsEnvironment *
, m_pGameData( pParams->pGameData )
, m_materialIndex( Max( nMaterialIndex, 0 ) ) // Sometimes we get passed -1.
, m_flVolume( pParams->volume )
, m_pName( pParams->pName )
{
// Josh:
// Assert that m_pGameData is the first element, some games
@ -916,8 +917,7 @@ const CPhysCollide *JoltPhysicsObject::GetCollide() const
const char *JoltPhysicsObject::GetName() const
{
// Slart: Jolt used to store debug names in JPH::Body, but it was removed. So now everybody's NoName.
return "NoName";
return m_pName;
}
//-------------------------------------------------------------------------------------------------

View File

@ -239,6 +239,7 @@ private:
// remain un-named offset by the vtable to get to this
// instead of calling GetGameData().
void *m_pGameData = nullptr;
const char *m_pName = "NoName";
uint16 m_gameFlags = 0;
uint16 m_gameIndex = 0;