- Adopted Nash's code for handling models with INTERPOLATE.

This commit is contained in:
Major Cooke 2017-02-01 11:33:12 -06:00 committed by Christoph Oelckers
parent 39fcea9176
commit d55f1d3f6f
1 changed files with 8 additions and 0 deletions

View File

@ -38,6 +38,7 @@
#include "r_state.h" #include "r_state.h"
#include "d_player.h" #include "d_player.h"
#include "g_levellocals.h" #include "g_levellocals.h"
#include "r_utility.h"
//#include "resources/voxels.h" //#include "resources/voxels.h"
//#include "gl/gl_intern.h" //#include "gl/gl_intern.h"
@ -1011,6 +1012,13 @@ void gl_RenderModel(GLSprite * spr)
// Model space => World space // Model space => World space
gl_RenderState.mModelMatrix.translate(spr->x, spr->z, spr->y ); 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: // Applying model transformations:
// 1) Applying actor angle, pitch and roll to the model // 1) Applying actor angle, pitch and roll to the model
gl_RenderState.mModelMatrix.rotate(-angle, 0, 1, 0); gl_RenderState.mModelMatrix.rotate(-angle, 0, 1, 0);