mirror of
https://github.com/ZDoom/Raze.git
synced 2025-01-31 04:20:42 +00:00
- Repair interpolation issues following change of sprite angles from integer to DAngle
types.
This commit is contained in:
parent
47ed6cbd61
commit
02dfe2cb62
6 changed files with 10 additions and 10 deletions
|
@ -43,7 +43,7 @@ public:
|
|||
|
||||
DVector3 opos;
|
||||
int time;
|
||||
int16_t oang;
|
||||
DAngle oang;
|
||||
int16_t spritesetindex;
|
||||
|
||||
|
||||
|
@ -192,9 +192,9 @@ public:
|
|||
};
|
||||
}
|
||||
|
||||
int16_t interpolatedang(double const smoothratio)
|
||||
DAngle interpolatedang(double const smoothratio)
|
||||
{
|
||||
return interpolatedangle(oang, int_ang(), smoothratio, 16);
|
||||
return interpolatedangle(oang, spr.angle, smoothratio, 16);
|
||||
}
|
||||
|
||||
void backupx()
|
||||
|
@ -225,7 +225,7 @@ public:
|
|||
|
||||
void backupang()
|
||||
{
|
||||
oang = int_ang();
|
||||
oang = spr.angle;
|
||||
}
|
||||
|
||||
void backuploc()
|
||||
|
|
|
@ -579,7 +579,7 @@ void viewProcessSprites(tspriteArray& tsprites, int32_t cX, int32_t cY, int32_t
|
|||
if (cl_interpolate && owneractor->interpolated && !(pTSprite->flags & 512))
|
||||
{
|
||||
pTSprite->pos = owneractor->interpolatedvec3(gInterpolate);
|
||||
pTSprite->set_int_ang(owneractor->interpolatedang(gInterpolate));
|
||||
pTSprite->angle = owneractor->interpolatedang(gInterpolate);
|
||||
}
|
||||
int nAnim = 0;
|
||||
switch (picanm[nTile].extra & 7) {
|
||||
|
|
|
@ -568,7 +568,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
int xx = twod->GetWidth() / 2. + x1 / 4096.;
|
||||
int yy = twod->GetHeight() / 2. + y1 / 4096.;
|
||||
|
||||
daang = ((!SyncInput() ? act->int_ang() : act->interpolatedang(smoothratio)) - cang) & 2047;
|
||||
daang = ((!SyncInput() ? act->spr.angle : act->interpolatedang(smoothratio)).Buildang() - cang) & 2047;
|
||||
|
||||
if (p == screenpeek || ud.coop == 1)
|
||||
{
|
||||
|
|
|
@ -95,7 +95,7 @@ void GameInterface::UpdateCameras(double smoothratio)
|
|||
display_mirror = 1; // should really be 'display external view'.
|
||||
auto cstat = camera->spr.cstat;
|
||||
camera->spr.cstat = CSTAT_SPRITE_INVISIBLE;
|
||||
render_camtex(camera, camera->int_pos(), camera->sector(), DAngle::fromBuild(camera->interpolatedang(smoothratio)), buildhoriz(camera->spr.shade), DAngle::fromDeg(0.), tex, rect, smoothratio);
|
||||
render_camtex(camera, camera->int_pos(), camera->sector(), camera->interpolatedang(smoothratio), buildhoriz(camera->spr.shade), DAngle::fromDeg(0.), tex, rect, smoothratio);
|
||||
camera->spr.cstat = cstat;
|
||||
display_mirror = 0;
|
||||
});
|
||||
|
@ -326,7 +326,7 @@ void displayrooms(int snum, double smoothratio, bool sceneonly)
|
|||
if (p->newOwner != nullptr)
|
||||
{
|
||||
auto act = p->newOwner;
|
||||
cang = DAngle::fromBuild(act->interpolatedang(smoothratio));
|
||||
cang = act->interpolatedang(smoothratio);
|
||||
choriz = buildhoriz(act->spr.shade);
|
||||
cposx = act->int_pos().X;
|
||||
cposy = act->int_pos().Y;
|
||||
|
|
|
@ -74,7 +74,7 @@ static void analyzesprites(tspriteArray& tsprites, int x, int y, int z, double c
|
|||
{
|
||||
// interpolate sprite position
|
||||
pTSprite->pos = pTSprite->ownerActor->interpolatedvec3(smoothratio);
|
||||
pTSprite->set_int_ang(pTSprite->ownerActor->interpolatedang(smoothratio));
|
||||
pTSprite->angle = pTSprite->ownerActor->interpolatedang(smoothratio);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1653,7 +1653,7 @@ bool GameInterface::DrawAutomapPlayer(int mx, int my, int cposx, int cposy, int
|
|||
|
||||
if (czoom > 192)
|
||||
{
|
||||
daang = ((!SyncInput() ? actor->int_ang() : actor->interpolatedang(smoothratio)) - cang) & 2047;
|
||||
daang = ((!SyncInput() ? actor->spr.angle : actor->interpolatedang(smoothratio)).Buildang() - cang) & 2047;
|
||||
|
||||
// Special case tiles
|
||||
if (actor->spr.picnum == 3123) break;
|
||||
|
|
Loading…
Reference in a new issue