Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion source/src/rendermodel.cpp
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
4 changes: 3 additions & 1 deletion source/src/vertmodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down