forked from mirrors/0ad
# Use the correct projectile models.
Fixes #470. Make CUnit::GetObject return a reference so it's clear it can never be NULL. This was SVN commit r7463.
This commit is contained in:
@@ -66,6 +66,10 @@ void CUnitAnimation::SetAnimationState(const CStr& name, bool once, float speed,
|
||||
void CUnitAnimation::SetAnimationSync(float actionTime, float repeatTime)
|
||||
{
|
||||
CModel* model = m_Unit.GetModel();
|
||||
|
||||
if (!model || !model->m_Anim || !model->m_Anim->m_AnimDef)
|
||||
return;
|
||||
|
||||
float duration = model->m_Anim->m_AnimDef->GetDuration();
|
||||
|
||||
// Set the speed so it loops once in repeatTime
|
||||
|
||||
Reference in New Issue
Block a user