- fixed: The pitch negation required for INHERITACTORPITCH was also applied to the one from PITCHFROMMOMENTUM.

This commit is contained in:
Christoph Oelckers 2016-05-17 09:12:26 +02:00
parent 5e4be101f1
commit 362e21a6b3

View file

@ -963,7 +963,7 @@ void gl_RenderModel(GLSprite * spr)
// Added MDL_INHERITACTORPITCH and MDL_INHERITACTORROLL flags processing.
// If both flags MDL_INHERITACTORPITCH and MDL_PITCHFROMMOMENTUM are set, the pitch sums up the actor pitch and the momentum vector pitch.
if(smf->flags & MDL_INHERITACTORPITCH) pitch += spr->actor->Angles.Pitch.Degrees;
if(smf->flags & MDL_INHERITACTORPITCH) pitch -= spr->actor->Angles.Pitch.Degrees;
if(smf->flags & MDL_INHERITACTORROLL) roll += spr->actor->Angles.Roll.Degrees;
gl_RenderState.mModelMatrix.loadIdentity();
@ -974,7 +974,7 @@ void gl_RenderModel(GLSprite * spr)
// Applying model transformations:
// 1) Applying actor angle, pitch and roll to the model
gl_RenderState.mModelMatrix.rotate(-angle, 0, 1, 0);
gl_RenderState.mModelMatrix.rotate(-pitch, 0, 0, 1);
gl_RenderState.mModelMatrix.rotate(pitch, 0, 0, 1);
gl_RenderState.mModelMatrix.rotate(-roll, 1, 0, 0);
// 2) Applying Doomsday like rotation of the weapon pickup models