- Duke: Create new flag SFLAG2_INTERPOLATEANGLE and use for the bearing plate on gears.

* Fixes #719.
This commit is contained in:
Mitchell Richters 2022-10-24 19:40:11 +11:00 committed by Christoph Oelckers
parent 65acafc2bd
commit 79a1110d5f
5 changed files with 13 additions and 0 deletions

View file

@ -175,6 +175,11 @@ void animatesprites_d(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
t->pos = h->interpolatedpos(interpfrac);
}
if (actorflag(h, SFLAG2_INTERPOLATEANGLE))
{
t->angle = h->interpolatedangle(interpfrac);
}
auto sectp = h->sector();
t1 = h->temp_data[1];
t3 = h->temp_data[3];

View file

@ -156,6 +156,11 @@ void animatesprites_r(tspriteArray& tsprites, const DVector2& viewVec, DAngle vi
t->pos = h->interpolatedpos(interpfrac);
}
if (actorflag(h, SFLAG2_INTERPOLATEANGLE))
{
t->angle = h->interpolatedangle(interpfrac);
}
auto sectp = h->sector();
t1 = h->temp_data[1];
t3 = h->temp_data[3];

View file

@ -347,6 +347,7 @@ enum sflags2_t
SFLAG2_BREAKMIRRORS = 0x00000080,
SFLAG2_CAMERA = 0x00000100,
SFLAG2_DONTANIMATE = 0x00000200,
SFLAG2_INTERPOLATEANGLE = 0x00000400,
};
using EDukeFlags2 = TFlags<sflags2_t, uint32_t>;

View file

@ -223,6 +223,7 @@ void initactorflags_d()
setflag(SFLAG2_BREAKMIRRORS, { RADIUSEXPLOSION, RPG, HYDRENT, HEAVYHBOMB, SEENINE, OOZFILTER, EXPLODINGBARREL });
setflag(SFLAG2_CAMERA, { CAMERA1 });
setflag(SFLAG2_DONTANIMATE, { TRIPBOMB, LASERLINE });
setflag(SFLAG2_INTERPOLATEANGLE, { BEARINGPLATE });
if (isWorldTour())
{

View file

@ -123,6 +123,7 @@ x(DOORTILE22, 395)
x(FANSPRITE, 407)
x(FANSPRITEBROKE, 411)
x(FANSHADOW, 412)
x(BEARINGPLATE, 418)
x(FANSHADOWBROKE, 416)
x(DOORTILE18, 447)
x(DOORTILE19, 448)