mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2025-02-21 19:10:50 +00:00
- fixed: The pitch negation required for INHERITACTORPITCH was also applied to the one from PITCHFROMMOMENTUM.
This commit is contained in:
parent
5e4be101f1
commit
362e21a6b3
1 changed files with 2 additions and 2 deletions
|
@ -963,7 +963,7 @@ void gl_RenderModel(GLSprite * spr)
|
||||||
|
|
||||||
// Added MDL_INHERITACTORPITCH and MDL_INHERITACTORROLL flags processing.
|
// 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 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;
|
if(smf->flags & MDL_INHERITACTORROLL) roll += spr->actor->Angles.Roll.Degrees;
|
||||||
|
|
||||||
gl_RenderState.mModelMatrix.loadIdentity();
|
gl_RenderState.mModelMatrix.loadIdentity();
|
||||||
|
@ -974,7 +974,7 @@ void gl_RenderModel(GLSprite * spr)
|
||||||
// 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);
|
||||||
gl_RenderState.mModelMatrix.rotate(-pitch, 0, 0, 1);
|
gl_RenderState.mModelMatrix.rotate(pitch, 0, 0, 1);
|
||||||
gl_RenderState.mModelMatrix.rotate(-roll, 1, 0, 0);
|
gl_RenderState.mModelMatrix.rotate(-roll, 1, 0, 0);
|
||||||
|
|
||||||
// 2) Applying Doomsday like rotation of the weapon pickup models
|
// 2) Applying Doomsday like rotation of the weapon pickup models
|
||||||
|
|
Loading…
Reference in a new issue