diff --git a/source/src/rendermodel.cpp b/source/src/rendermodel.cpp index 1890d4580..8539a8642 100644 --- a/source/src/rendermodel.cpp +++ b/source/src/rendermodel.cpp @@ -1,6 +1,7 @@ #include "cube.h" -VARP(animationinterpolationtime, 0, 150, 1000); +// 165 is the highest value that does not break player animations when firing the SMG +VARP(animationinterpolationtime, 0, 165, 1000); model *loadingmodel = NULL; mapmodelattributes loadingattributes; diff --git a/source/src/vertmodel.h b/source/src/vertmodel.h index 08d513313..1fc6fcc56 100644 --- a/source/src/vertmodel.h +++ b/source/src/vertmodel.h @@ -887,7 +887,9 @@ struct vertmodel : model if(doai) { prev.setframes(d->prev[index]); - ai_t = (lastmillis-d->lastanimswitchtime[index])/(float)animationinterpolationtime; + // use easeInOutSine easing for smoother appearance + // https://easings.net/#easeInOutSine + ai_t = -(cos(M_PI * (lastmillis-d->lastanimswitchtime[index])/(float)animationinterpolationtime) - 1) / 2; } glPushMatrix();