Added INTERPOLATE actor flag, allowing the previously reverted interpolation code to be toggleable.

This commit is contained in:
Major Cooke 2017-02-01 11:12:13 -06:00 committed by Christoph Oelckers
parent 04988a331b
commit 39fcea9176
3 changed files with 7 additions and 2 deletions

View file

@ -424,6 +424,7 @@ enum ActorRenderFlag
RF_MASKROTATION = 0x00200000, // [MC] Only draw the actor when viewed from a certain angle range.
RF_ABSMASKANGLE = 0x00400000, // [MC] The mask rotation does not offset by the actor's angle.
RF_ABSMASKPITCH = 0x00800000, // [MC] The mask rotation does not offset by the actor's pitch.
RF_INTERPOLATE = 0x01000000, // [MC] Allow interpolation of the actor's angle, pitch and roll.
RF_FORCEYBILLBOARD = 0x10000, // [BB] OpenGL only: draw with y axis billboard, i.e. anchored to the floor (overrides gl_billboard_mode setting)
RF_FORCEXYBILLBOARD = 0x20000, // [BB] OpenGL only: draw with xy axis billboard, i.e. unanchored (overrides gl_billboard_mode setting)

View file

@ -737,8 +737,11 @@ void GLSprite::Process(AActor* thing, sector_t * sector, int thruportal)
int clipres = GLRenderer->mClipPortal->ClipPoint(thingpos);
if (clipres == GLPortal::PClip_InFront) return;
}
// disabled because almost none of the actual game code is even remotely prepared for this. Sorry for the few cases where it may be desired, but the overall effect is too bad.
Angles = thing->Angles;// InterpolatedAngles(r_TicFracF);
// disabled because almost none of the actual game code is even remotely prepared for this. If desired, use the INTERPOLATE flag.
if (thing->renderflags & RF_INTERPOLATE)
Angles = thing->InterpolatedAngles(r_TicFracF);
else
Angles = thing->Angles;
player_t *player = &players[consoleplayer];
FloatRect r;

View file

@ -326,6 +326,7 @@ static FFlagDef ActorFlagDefs[]=
DEFINE_FLAG(RF, ABSMASKPITCH, AActor, renderflags),
DEFINE_FLAG(RF, XFLIP, AActor, renderflags),
DEFINE_FLAG(RF, YFLIP, AActor, renderflags),
DEFINE_FLAG(RF, INTERPOLATE, AActor, renderflags),
// Bounce flags
DEFINE_FLAG2(BOUNCE_Walls, BOUNCEONWALLS, AActor, BounceFlags),