mirror of
https://gitlab.com/skmp/dca3-game.git
synced 2025-04-24 06:42:26 +02:00
CAnimBlendNode::GetCurrentTranslation: Protect against zero delta times
This commit is contained in:
parent
2065c9a93f
commit
911b93bd0f
@ -140,7 +140,7 @@ CAnimBlendNode::GetCurrentTranslation(CVector &trans, float weight)
|
||||
float blend = association->GetBlendAmount(weight);
|
||||
if(blend > 0.0f){
|
||||
auto kfAdt = sequence->GetDeltaTime(frameA);
|
||||
float t = (kfAdt - remainingTime)/kfAdt;
|
||||
float t = kfAdt == 0.0f ? 0.0f : (kfAdt - remainingTime)/kfAdt;
|
||||
if(sequence->type & CAnimBlendSequence::KF_TRANS){
|
||||
auto kfAt = sequence->GetTranslation(frameA);
|
||||
auto kfBt = sequence->GetTranslation(frameB);
|
||||
|
Loading…
x
Reference in New Issue
Block a user