From d55f1d3f6ff43b6850ba07d1d7caf5d397c05ad8 Mon Sep 17 00:00:00 2001 From: Major Cooke Date: Wed, 1 Feb 2017 11:33:12 -0600 Subject: [PATCH] - Adopted Nash's code for handling models with INTERPOLATE. --- src/gl/models/gl_models.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/gl/models/gl_models.cpp b/src/gl/models/gl_models.cpp index ce6b22ee8..2a481e018 100644 --- a/src/gl/models/gl_models.cpp +++ b/src/gl/models/gl_models.cpp @@ -38,6 +38,7 @@ #include "r_state.h" #include "d_player.h" #include "g_levellocals.h" +#include "r_utility.h" //#include "resources/voxels.h" //#include "gl/gl_intern.h" @@ -1010,6 +1011,13 @@ void gl_RenderModel(GLSprite * spr) // Model space => World space gl_RenderState.mModelMatrix.translate(spr->x, spr->z, spr->y ); + + if (spr->actor->renderflags & RF_INTERPOLATE) + { + // [Nash] use interpolated angles + DRotator Angles = spr->actor->InterpolatedAngles(r_TicFracF); + angle = Angles.Yaw.Degrees; + } // Applying model transformations: // 1) Applying actor angle, pitch and roll to the model