mirror of
https://github.com/AxioDL/PrimeWorldEditor.git
synced 2025-12-08 21:17:53 +00:00
CCharacterEditor: Remove redundant animation access
We can just use the retrieved animation the first time.
This commit is contained in:
@@ -81,14 +81,13 @@ void CCharacterEditor::EditorTick(float DeltaTime)
|
||||
|
||||
void CCharacterEditor::UpdateAnimTime(float DeltaTime)
|
||||
{
|
||||
CAnimation *pAnim = CurrentAnimation();
|
||||
const CAnimation *pAnim = CurrentAnimation();
|
||||
|
||||
if (pAnim && mPlayAnim && !mBindPose && !ui->AnimSlider->isSliderDown())
|
||||
{
|
||||
mAnimTime += DeltaTime * mPlaybackSpeed;
|
||||
|
||||
CAnimation *pAnim = CurrentAnimation();
|
||||
float AnimLength = (pAnim ? pAnim->Duration() : 0.f);
|
||||
const float AnimLength = pAnim->Duration();
|
||||
|
||||
if (mAnimTime > AnimLength)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user