1
0
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:
Ykkrosh
2010-04-17 11:34:40 +00:00
parent fb72b3c63b
commit 6a9de50692
14 changed files with 72 additions and 26 deletions
+4
View File
@@ -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