Take parent library into account for animator checking
This commit is contained in:
parent
1ee2f01fbc
commit
b9af85442b
@ -755,7 +755,7 @@ bool TrackObject::joinToMainTrack()
|
|||||||
{
|
{
|
||||||
// If no physical object or there is animator, skip it
|
// If no physical object or there is animator, skip it
|
||||||
// Also no joining if will affect kart (like moveable, flatten...)
|
// Also no joining if will affect kart (like moveable, flatten...)
|
||||||
if (!isEnabled() || !m_physical_object || m_animator ||
|
if (!isEnabled() || !m_physical_object || hasAnimatorRecursively() ||
|
||||||
m_physical_object->isDynamic() || m_physical_object->isCrashReset() ||
|
m_physical_object->isDynamic() || m_physical_object->isCrashReset() ||
|
||||||
m_physical_object->isExplodeKartObject() ||
|
m_physical_object->isExplodeKartObject() ||
|
||||||
m_physical_object->isFlattenKartObject())
|
m_physical_object->isFlattenKartObject())
|
||||||
|
@ -231,6 +231,16 @@ public:
|
|||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
const ThreeDAnimation* getAnimator() const { return m_animator; }
|
const ThreeDAnimation* getAnimator() const { return m_animator; }
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
|
/* Return true if it has animator or its parent library has */
|
||||||
|
bool hasAnimatorRecursively() const
|
||||||
|
{
|
||||||
|
if (m_animator)
|
||||||
|
return true;
|
||||||
|
if (!m_parent_library)
|
||||||
|
return false;
|
||||||
|
return m_parent_library->hasAnimatorRecursively();
|
||||||
|
}
|
||||||
|
// ------------------------------------------------------------------------
|
||||||
void setPaused(bool mode){ m_animator->setPaused(mode); }
|
void setPaused(bool mode){ m_animator->setPaused(mode); }
|
||||||
// ------------------------------------------------------------------------
|
// ------------------------------------------------------------------------
|
||||||
void setInitiallyVisible(bool val) { m_initially_visible = val; }
|
void setInitiallyVisible(bool val) { m_initially_visible = val; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user