Changeset 25205
- Timestamp:
- Apr 7, 2021, 10:35:02 AM (3 years ago)
- Location:
- ps/trunk/source/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
ps/trunk/source/graphics/UnitAnimation.cpp
r24629 r25205 91 91 void CUnitAnimation::ReloadAnimation() 92 92 { 93 UpdateAnimationID();94 93 ReloadUnit(m_Model, m_Object); 95 94 } … … 102 101 m_AnimStates.clear(); 103 102 m_AnimStatesAreStatic = true; 103 104 104 AddModel(m_Model, m_Object); 105 105 } … … 238 238 // choose animations from the complete state 239 239 CStr oldID = m_AnimationID; 240 UpdateAnimationID();240 AnimationID(); 241 241 anim = it->object->GetRandomAnimation(m_State, m_AnimationID); 242 242 if (oldID != m_AnimationID) … … 283 283 } 284 284 285 void CUnitAnimation::UpdateAnimationID() 286 { 287 CStr& ID = m_Object->GetRandomAnimation(m_State)->m_ID; 288 m_AnimationID = ID; 289 } 285 void CUnitAnimation::PickAnimationID() 286 { 287 m_AnimationID = m_Object->GetRandomAnimation(m_State)->m_ID; 288 } -
ps/trunk/source/graphics/UnitAnimation.h
r24352 r25205 1 /* Copyright (C) 202 0Wildfire Games.1 /* Copyright (C) 202 Wildfire Games. 2 2 * This file is part of 0 A.D. 3 3 * … … 104 104 * Picks a new animation ID from our current state 105 105 */ 106 void UpdateAnimationID();106 void AnimationID(); 107 107 108 108 struct SModelAnimState
Note:
See TracChangeset
for help on using the changeset viewer.