mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-11-09 16:50:42 +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:
1 parent
5c03456a38
commit
310f3466a8
27 files changed
+271
-309
No files matched your search
@@ -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