Made JoltPhysicsObject::GetName() functional
This commit is contained in:
parent
50cef39716
commit
c63e5211b3
|
@ -31,6 +31,7 @@ JoltPhysicsObject::JoltPhysicsObject( JPH::Body *pBody, JoltPhysicsEnvironment *
|
||||||
, m_pGameData( pParams->pGameData )
|
, m_pGameData( pParams->pGameData )
|
||||||
, m_materialIndex( Max( nMaterialIndex, 0 ) ) // Sometimes we get passed -1.
|
, m_materialIndex( Max( nMaterialIndex, 0 ) ) // Sometimes we get passed -1.
|
||||||
, m_flVolume( pParams->volume )
|
, m_flVolume( pParams->volume )
|
||||||
|
, m_pName( pParams->pName )
|
||||||
{
|
{
|
||||||
// Josh:
|
// Josh:
|
||||||
// Assert that m_pGameData is the first element, some games
|
// Assert that m_pGameData is the first element, some games
|
||||||
|
@ -916,8 +917,7 @@ const CPhysCollide *JoltPhysicsObject::GetCollide() const
|
||||||
|
|
||||||
const char *JoltPhysicsObject::GetName() 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 m_pName;
|
||||||
return "NoName";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//-------------------------------------------------------------------------------------------------
|
//-------------------------------------------------------------------------------------------------
|
||||||
|
|
|
@ -239,6 +239,7 @@ private:
|
||||||
// remain un-named offset by the vtable to get to this
|
// remain un-named offset by the vtable to get to this
|
||||||
// instead of calling GetGameData().
|
// instead of calling GetGameData().
|
||||||
void *m_pGameData = nullptr;
|
void *m_pGameData = nullptr;
|
||||||
|
const char *m_pName = "NoName";
|
||||||
|
|
||||||
uint16 m_gameFlags = 0;
|
uint16 m_gameFlags = 0;
|
||||||
uint16 m_gameIndex = 0;
|
uint16 m_gameIndex = 0;
|
||||||
|
|
Loading…
Reference in New Issue