Update preanim_timer to follow the weird ass time_mod constant

This commit is contained in:
Crystalwarrior 2019-09-16 01:17:13 +03:00
parent bf999f195a
commit 2268df7b15
2 changed files with 3 additions and 1 deletions

View File

@ -66,6 +66,8 @@ private:
QString m_emote; QString m_emote;
QElapsedTimer actual_time; QElapsedTimer actual_time;
//it will forever be a mystery who thought this time_mod system would ever be a good idea with precision-based emotes
const int time_mod = 60; const int time_mod = 60;
// These are the X and Y values before they are fixed based on the sprite's width. // These are the X and Y values before they are fixed based on the sprite's width.

View File

@ -164,7 +164,7 @@ void AOCharMovie::play_pre(QString p_char, QString p_emote, int duration)
//not without looping through all frames in the image at least - which causes lag. So for now it simply ends the preanimation early instead. //not without looping through all frames in the image at least - which causes lag. So for now it simply ends the preanimation early instead.
play_once = true; play_once = true;
if (duration > 0) //It's -1 if there's no definition in [Time] for it. In which case, it will let the animation run out in full. Duration 0 does the same. if (duration > 0) //It's -1 if there's no definition in [Time] for it. In which case, it will let the animation run out in full. Duration 0 does the same.
preanim_timer->start(duration); //This timer will not fire if the animation finishes earlier than that preanim_timer->start(duration * time_mod); //This timer will not fire if the animation finishes earlier than that
play(); play();
} }