mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-09-21 20:06:40 +00:00
# Hotloading of actor XML files.
Stop ignoring actor XML animation speeds. Add decentralised registration of hotloaders. Move player ID storage into CModel, to simplify CUnit. Remove obsolete unit ID allocation code. Remove some material junk. This was SVN commit r7605.
This commit is contained in:
@@ -75,6 +75,10 @@ void CUnitAnimation::SetAnimationSync(float actionTime, float repeatTime)
|
||||
// Set the speed so it loops once in repeatTime
|
||||
float speed = duration / repeatTime;
|
||||
|
||||
// Compensate for the animation's scale factor
|
||||
if (model.m_Anim->m_Speed)
|
||||
speed /= model.m_Anim->m_Speed;
|
||||
|
||||
// Need to offset so that start+actionTime*speed = ActionPos
|
||||
float start = model.m_Anim->m_ActionPos - actionTime*speed;
|
||||
// Wrap it so that it's within the animation
|
||||
|
||||
Reference in New Issue
Block a user